Forum > Scripts >

I need some help adding a bit of a script

Posts: 3

Threads: 1

Joined: May, 2020

Reputation: 0

Posted

Here is my scipt that I have made

 

--------------------------------------------------------------------------------------------------

local ScreenGui = Instance.new("ScreenGui")

local Main = Instance.new("Frame")

local title = Instance.new("TextLabel")

local Spawn = Instance.new("TextButton")

 

ScreenGui.Parent = game.CoreGui

 

Main.Name = "Main"

Main.Parent = ScreenGui

Main.BackgroundColor3 = Color3.fromRGB(0, 59, 255)

Main.Position = UDim2.new(0, 0, 0.90561223, 0)

Main.Size = UDim2.new(0, 247, 0, 74)

Main.Active = true

Main.Draggable = true

 

title.Name = "title"

title.Parent = Main

title.BackgroundColor3 = Color3.fromRGB(0, 0, 255)

title.Size = UDim2.new(0, 247, 0, 22)

title.Font = Enum.Font.SciFi

title.Text = "Platformer"

title.TextColor3 = Color3.fromRGB(255, 0, 0)

title.TextSize = 14.000

 

Spawn.Name = "Spawn"

Spawn.Parent = Main

Spawn.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

Spawn.Position = UDim2.new(0.0931174085, 0, 0.297297299, 0)

Spawn.Size = UDim2.new(0, 200, 0, 58)

Spawn.Font = Enum.Font.SourceSans

Spawn.Text = "Spawn Plaform"

Spawn.TextColor3 = Color3.fromRGB(0, 0, 0)

Spawn.TextSize = 26.000

Spawn.MouseButton1Down:connect(function()

--Script goes here

 

end)

------------------------------------------------------------------------------------------------------

Here is the script I want to add

------------------------------------------------------------------------------------------------------

local Platform = CreateButton("Platform", StuffFrame)
Platform.Position = UDim2.new(0.5,-60,0,50)
Platform.MouseButton1Click:connect(function()
    local p = Instance.new("Part", workspace)
    p.Size = Vector3.new(30,0.5,30)
    p.Anchored = true
    p.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0,15,0)
    plr.Character:MoveTo(p.Position + Vector3.new(0,1,0))
    spawn(function()
        while p.Parent do
            wait(1)
            if (plr.Character.HumanoidRootPart.Position - p.Position).magnitude > 20 then
                p:Destroy()
            end
        end
    end)
end)
----------------------------------------------------------------
  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

Fixed Script:

 

local ScreenGui = Instance.new("ScreenGui")

local Main = Instance.new("Frame")

local title = Instance.new("TextLabel")

local Spawn = Instance.new("TextButton")

 

ScreenGui.Parent = game.CoreGui

 

Main.Name = "Main"

Main.Parent = ScreenGui

Main.BackgroundColor3 = Color3.fromRGB(0, 59, 255)

Main.Position = UDim2.new(0, 0, 0.90561223, 0)

Main.Size = UDim2.new(0, 247, 0, 74)

Main.Active = true

Main.Draggable = true

 

title.Name = "title"

title.Parent = Main

title.BackgroundColor3 = Color3.fromRGB(0, 0, 255)

title.Size = UDim2.new(0, 247, 0, 22)

title.Font = Enum.Font.SciFi

title.Text = "Platformer"

title.TextColor3 = Color3.fromRGB(255, 0, 0)

title.TextSize = 14.000

 

Spawn.Name = "Spawn"

Spawn.Parent = Main

Spawn.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

Spawn.Position = UDim2.new(0.0931174085, 0, 0.297297299, 0)

Spawn.Size = UDim2.new(0, 200, 0, 58)

Spawn.Font = Enum.Font.SourceSans

Spawn.Text = "Spawn Plaform"

Spawn.TextColor3 = Color3.fromRGB(0, 0, 0)

Spawn.TextSize = 26.000

Spawn.MouseButton1Down:connect(function()
  
    local plr = game:GetService('Players').LocalPlayer
    local p = Instance.new("Part", workspace)
    p.Size = Vector3.new(30,0.5,30)
    p.Anchored = true
    p.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0,15,0)
    plr.Character:MoveTo(p.Position + Vector3.new(0,1,0))
    spawn(function()
        while p.Parent do
            wait(1)
            if (plr.Character.HumanoidRootPart.Position - p.Position).magnitude > 20 then
                p:Destroy()
            end
        end
end)
end)

 

btw its a nice script, maybe assign to a letter but other than that, fun to play with :D

  • 0

Posts: 1372

Threads: 87

Joined: May, 2018

Reputation: 24

Replied

is that even your script lol

  • 0

Hello there

#StayHome

 

Posts: 3

Threads: 1

Joined: May, 2020

Reputation: 0

Replied

@55258 Hey I was Trying to add another button to it but now it has removed the buttons all together Can you help 

 

-------------------------------------------------------------------------------------------------------------------------------------

 

local ScreenGui = Instance.new("ScreenGui")

 

local Main = Instance.new("Frame")

 

local title = Instance.new("TextLabel")

 

local Spawn = Instance.new("TextButton")

 

local Btools = Instance.new("TextButton")

 

 

 

ScreenGui.Parent = game.CoreGui

 

 

 

Main.Name = "Main"

 

Main.Parent = ScreenGui

 

Main.BackgroundColor3 = Color3.fromRGB(0, 59, 255)

 

Main.Position = UDim2.new(-0.000937164237, 0, 0.590871215, 0)

 

Main.Size = UDim2.new(0, 247, 0, 125)

 

Main.Active = true

 

Main.Draggable = true

 

 

 

title.Name = "title"

 

title.Parent = Main

 

title.BackgroundColor3 = Color3.fromRGB(0, 0, 255)

 

title.Size = UDim2.new(0, 247, 0, 22)

 

title.Font = Enum.Font.SciFi

 

title.Text = "Made By Thunder6617 With Some Help"

 

title.TextColor3 = Color3.fromRGB(255, 0, 0)

 

title.TextSize = 14.000

 

 

 

Platform.Name = "Platform"

 

Platform.Parent = Main

 

Platform.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

 

Platform.Position = UDim2.new(0.214574933, 0, 0.287362099, 0)

 

Platform.Size = UDim2.new(0, 140, 0, 31)

 

Platform.Font = Enum.Font.SourceSans

 

Platform.Text = "Spawn Plaform"

 

Platform.TextColor3 = Color3.fromRGB(0, 0, 0)

 

Platform.TextSize = 26.000

 

Spawn.MouseButton1Down:connect(function()

 

local plr = game:GetService('Players').LocalPlayer

local p = Instance.new("Part", workspace)

p.Size = Vector3.new(30,0.5,30)

p.Anchored = true

p.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0,15,0)

plr.Character:MoveTo(p.Position + Vector3.new(0,1,0))

spawn(function()

while p.Parent do

wait(1)

if (plr.Character.HumanoidRootPart.Position - p.Position).magnitude > 20 then

p:Destroy()

end

end

end)

 

 

Btools.Name = "Btools"

 

Btools.Parent = Main

 

Btools.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

 

Btools.Position = UDim2.new(0.214574933, 0, 0.696966112, 0)

 

Btools.Size = UDim2.new(0, 140, 0, 31)

 

Btools.Font = Enum.Font.SourceSans

 

Btools.Text = "Btools"

 

Btools.TextColor3 = Color3.fromRGB(0, 0, 0)

 

Btools.TextSize = 26.000

 

Btools.MouseButton1Down:connect(function()

 

loadstring(game:HttpGet("https://pastebin.com/raw/LETNPL0E",true))()

end)

 

 

end)

 

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@tigerjess12 First try going to F9 and see if something is wrong in the script, that would stop it from rendering, I'll mess around with it tho in the meantime :D

 

EDIT: at first glance you clearly aren't sporty in functions and scripting in general, the "end)" is supposed to end a function, you have put that at the end of the script, lemme fix it up rq! :D

 

Sorry for the spaced out XD for some reason everytime I enter into a text box editor it spaces out ;( Should still work just as well tho!

 

JUST FIXED! :D

---------------------------------------------------

local ScreenGui = Instance.new("ScreenGui")

 

local Main = Instance.new("Frame")

 

local title = Instance.new("TextLabel")

 

 

 

local Platform = Instance.new("TextButton")

 

 

 

local Btools = Instance.new("TextButton")

 

 

 

 

 

 

 

ScreenGui.Parent = game.CoreGui

 

 

 

 

 

 

 

Main.Name = "Main"

 

 

 

Main.Parent = ScreenGui

 

 

 

Main.BackgroundColor3 = Color3.fromRGB(0, 59, 255)

 

 

 

Main.Position = UDim2.new(-0.000937164237, 0, 0.590871215, 0)

 

 

 

Main.Size = UDim2.new(0, 247, 0, 125)

 

 

 

Main.Active = true

 

 

 

Main.Draggable = true

 

 

 

 

 

 

 

title.Name = "title"

 

 

 

title.Parent = Main

 

 

 

title.BackgroundColor3 = Color3.fromRGB(0, 0, 255)

 

 

 

title.Size = UDim2.new(0, 247, 0, 22)

 

 

 

title.Font = Enum.Font.SciFi

 

 

 

title.Text = "Made By Thunder6617 With Some Help"

 

 

 

title.TextColor3 = Color3.fromRGB(255, 0, 0)

 

 

 

title.TextSize = 14.000

 

 

 

 

 

 

 

Platform.Name = "Platform"

 

 

 

Platform.Parent = Main

 

 

 

Platform.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

 

 

 

Platform.Position = UDim2.new(0.214574933, 0, 0.287362099, 0)

 

 

 

Platform.Size = UDim2.new(0, 140, 0, 31)

 

 

 

Platform.Font = Enum.Font.SourceSans

 

 

 

Platform.Text = "Spawn Plaform"

 

 

 

Platform.TextColor3 = Color3.fromRGB(0, 0, 0)

 

 

 

Platform.TextSize = 26.000

 

 

 

 

 

 

 

 

 

Btools.Name = "Btools"

 

 

 

Btools.Parent = Main

 

 

 

Btools.BackgroundColor3 = Color3.fromRGB(116, 255, 239)

 

 

 

Btools.Position = UDim2.new(0.214574933, 0, 0.696966112, 0)

 

 

 

Btools.Size = UDim2.new(0, 140, 0, 31)

 

Btools.Font = Enum.Font.SourceSans

 

 

 

Btools.Text = "Btools"

 

 

 

Btools.TextColor3 = Color3.fromRGB(0, 0, 0)

 

 

 

Btools.TextSize = 26.000

 






 Platform.MouseButton1Down:connect(function()

 

local plr = game:GetService('Players').LocalPlayer

 

local p = Instance.new("Part", workspace)

 

p.Size = Vector3.new(30,0.5,30)

 

p.Anchored = true

 

p.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0,15,0)

 

plr.Character:MoveTo(p.Position + Vector3.new(0,1,0))

 

spawn(function()

 

while p.Parent do

 

wait(1)

 

if (plr.Character.HumanoidRootPart.Position - p.Position).magnitude > 20 then

 

p:Destroy()

 

end

end

end)

end)

Btools.MouseButton1Down:connect(function()

loadstring(game:HttpGet("https://pastebin.com/raw/LETNPL0E", true))();

end)

  • 0

HappyGame

classiccat's alt!

Posts: 10

Threads: 1

Joined: Jun, 2020

Reputation: -20

Replied

Change this section to lua. 

  • 0

M y s t e r y

 

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )