Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.fusionfriends
- local Character = workspace.fusionfriends
- local Obbys = script.Obbys
- local Stage = 1
- local Start
- local End
- local Sound = Instance.new("Sound",Character.Torso)
- Sound.Volume = 10
- Sound.SoundId = "rbxassetid://1283290053"
- function Continue()
- local Chance = math.random(1,4)
- for i,v in pairs(Obbys:GetChildren()) do
- if v.Value.Value == Chance then
- local Clone = v:Clone()
- Clone.Parent = workspace
- if v.Value.Value == 4 then
- v.Laser.Script.Disabled = false
- end
- if Stage > 1 then
- Start = Clone.Start
- Start.SurfaceGui.TextLabel.Text = Stage
- Start.CFrame = CFrame.new(End.Position.X,End.Position.Y,End.Position.Z)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90))
- End = Clone.End
- End.SurfaceGui.TextLabel.Text = Stage+1
- wait(.1)
- End.Touched:Connect(function(Hit)
- if Hit and Hit.Parent:FindFirstChild("Humanoid") then
- if Hit.Parent.Name == Player.Name then
- Sound:Play()
- Clone:Destroy()
- Stage = Stage+1
- Continue()
- end
- end
- end)
- elseif Start == nil and End == nil then
- if v.Value.Value == 4 then
- v.Laser.Script.Disabled = false
- end
- Start = Clone.Start
- for i,v in pairs(Start.SurfaceGui:GetChildren()) do
- print(v)
- end
- Start.SurfaceGui.TextLabel.Text = Stage
- End = Clone.End
- End.SurfaceGui.TextLabel.Text = Stage+1
- Start.CFrame = CFrame.new(-55.92,10.025,-251.07)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90))
- Character.HumanoidRootPart.CFrame = CFrame.new(Start.Position.X,Start.Position.Y+2,Start.Position.Z)
- End.Touched:Connect(function(Hit)
- if Hit and Hit.Parent:FindFirstChild("Humanoid") then
- if Hit.Parent.Name == Player.Name then
- Sound:Play()
- Clone:Destroy()
- Stage = Stage+1
- Continue()
- end
- end
- end)
- end
- break
- end
- end
- end
- Continue()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement