generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: IN GAME COMMERCIAL/TELEPORTER SCRIPT

Previous Thread :: Next Thread 
Tom11255 is not online. Tom11255
Joined: 09 Nov 2010
Total Posts: 365
08 Jul 2012 09:30 AM
Ads = {
{85851746,"Build Your Own Noob Trap!"},
{82230442,"Robloxian Waterpark"},
{id,"place"},
{id,"place"},
{id,"place"},
{id,"Gplace"},
{id,"place"},
{3id,"place"},
}
--Example of Table:
--[[
Ads = {
{place id,"place"},
{id,"place"},
{id,"place"}
}
Ads = { --Put the Places ID first, then the places name.
{PlaceId,"PlaceName"},
{PlaceId,"PlaceName"} --Do not put a ',' after if it is the last one!
}
--]]
-----------
--Options--
-----------
Position = 0
--0 = Bottom Right
--1 = Bottom Left
--2 = Mid Left
--3 = Mid Right
--4 = Upper Left
Randomize = false
--If it should show ads in a random order
-----------
--Options--
-----------
-------------------------------------------
-------------NO TOUCHY BELOW---------------
-------------------------------------------
CurSel = 0
Hub = "http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=230&assetId="
--Please note that these objects are created in a specific order
--Create ScreenGui
local s = Instance.new("ScreenGui")
s.Name = "AdGui"
s.Parent = script.Parent
--Setup the Frames
local f = Instance.new("Frame")
f.Name = "Main"
f.Style = "RobloxSquare"
if Position == 0 then
f.Position = UDim2.new(0.73,0,0.75,0)
elseif Position == 1 then
f.Position = UDim2.new(0.025,0,0.75,0)
elseif Position == 2 then
f.Position = UDim2.new(0.025,0,0.5,0)
elseif Position == 3 then
f.Position = UDim2.new(0.73,0,0.5,0)
elseif Position == 4 then
f.Position = UDim2.new(0.025,0,0.3,0)
else
f.Position = UDim2.new(0.73,0,0.75,0)
end
f.Size = UDim2.new(0.21,0,0.12,0)
f.Parent = s
local w = Instance.new("Frame")
w.Name = "Click"
w.Style = "RobloxSquare"
w.Position = UDim2.new(-0.125,0,1.15,0)
w.Size = UDim2.new(1.25,0,0.27,0)
w.Parent = f
local y = Instance.new("Frame")
y.Name = "Namez"
y.Style = "RobloxSquare"
y.Position = UDim2.new(-0.125,0,-0.405,0)
y.Size = UDim2.new(1.25,0,0.27,0)
y.Parent = f
--Setup the TextLabels
local t = Instance.new("TextLabel")
t.Name = "Tex"
t.BackgroundTransparency = 1
t.Font = "ArialBold"
t.FontSize = "Size18"
t.Text = "Click Image To Visit!"
t.TextColor3 = Color3.new(1,1,1)
t.TextWrap = true
t.Position = UDim2.new(0,0,0,0)
t.Size = UDim2.new(1,0,1,0)
t.Parent = w
local l = Instance.new("TextLabel")
l.Name = "Tex"
l.BackgroundTransparency = 1
l.Font = "ArialBold"
l.FontSize = "Size18"
l.Text = "Blank Game"
l.TextColor3 = Color3.new(1,1,1)
l.TextWrap = true
l.Position = UDim2.new(0,0,0,0)
l.Size = UDim2.new(1,0,1,0)
l.Parent = y
--Setup ImageButton
local z = Instance.new("ImageButton")
z.Name = "Img"
z.BackgroundTransparency = 1
z.Position = UDim2.new(-0.05,0,-0.125,0)
z.Size = UDim2.new(1.1,0,1.25,0)
z.Parent = f
--Click to Teleport Function
z.MouseButton1Up:connect(function()
pcall(function()
game:GetService("TeleportService"):Teleport(Ads[CurSel][1])
end)
end)
--Create Cycle
while true do
if not Randomize then
CurSel = CurSel +1
if CurSel > #Ads then
CurSel = 1
end
elseif Randomize then
CurSel = math.random(1,#Ads)
end
z.Image = Hub ..Ads[CurSel][1]
l.Text = Ads[CurSel][2]
wait(5)
end

Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
08 Jul 2012 09:33 AM
what doesnt work and where?
Report Abuse
Mathman314 is not online. Mathman314
Joined: 31 Jul 2009
Total Posts: 556
08 Jul 2012 09:35 AM
I think he might just be sharing his accomplishment...
Report Abuse
Tom11255 is not online. Tom11255
Joined: 09 Nov 2010
Total Posts: 365
08 Jul 2012 09:37 AM
Yes My Brother And I Scripted It. Yes It Works.
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
08 Jul 2012 12:22 PM
k
Report Abuse
Joalmo is not online. Joalmo
Joined: 28 Jun 2009
Total Posts: 1160
08 Jul 2012 12:28 PM
This isn't the forum for a thread like this.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image