View difference between Paste ID: 39mPYFaG and iA9qJQHQ
SHOW: | | - or go back to the newest paste.
1-
local Player = game.Players.fusionfriends
1+
local Player = game.Players.TameDoNotClick
2-
local Character = workspace.fusionfriends
2+
local Character = workspace.TameDoNotClick
3
local Obbys = script.Obbys
4
local Stage = 1
5
local Start
6
local End
7
local Sound = Instance.new("Sound",Character.Torso)
8
Sound.Volume = 10
9
Sound.SoundId = "rbxassetid://1283290053"
10
11
function Continue()
12
	local Chance = math.random(1,4)
13
	for i,v in pairs(Obbys:GetChildren()) do
14
		if v.Value.Value == Chance then
15
			local Clone = v:Clone()
16
			Clone.Parent = workspace
17
			if v.Value.Value == 4 then
18
				v.Laser.Script.Disabled = false
19
			end
20
			if Stage > 1 then
21
				Start = Clone.Start
22
				Start.SurfaceGui.TextLabel.Text = Stage
23
				Start.CFrame = CFrame.new(End.Position.X,End.Position.Y,End.Position.Z)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90))
24
				End = Clone.End
25
				End.SurfaceGui.TextLabel.Text = Stage+1
26
				wait(.1)
27
				End.Touched:Connect(function(Hit)
28
					if Hit and Hit.Parent:FindFirstChild("Humanoid") then
29
						if Hit.Parent.Name == Player.Name then
30
							Sound:Play()
31
							Clone:Destroy()
32
							Stage = Stage+1
33
							Continue()
34
						end
35
					end
36
				end)
37
			elseif Start == nil and End == nil then
38
				if v.Value.Value == 4 then
39
					v.Laser.Script.Disabled = false
40
				end
41
				Start = Clone.Start
42
				for i,v in pairs(Start.SurfaceGui:GetChildren()) do
43
					print(v)
44
				end
45
				Start.SurfaceGui.TextLabel.Text = Stage
46
				End = Clone.End
47
				End.SurfaceGui.TextLabel.Text = Stage+1
48
				Start.CFrame = CFrame.new(-55.92,10.025,-251.07)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90))
49
				Character.HumanoidRootPart.CFrame = CFrame.new(Start.Position.X,Start.Position.Y+2,Start.Position.Z)
50
				End.Touched:Connect(function(Hit)
51
					if Hit and Hit.Parent:FindFirstChild("Humanoid") then
52
						if Hit.Parent.Name == Player.Name then
53
							Sound:Play()
54
							Clone:Destroy()
55
							Stage = Stage+1
56
							Continue()
57
						end
58
					end
59
				end)
60
			end
61
			break
62
		end
63
	end
64
end
65
Continue()