Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- EventScript
- local Lib = workspace.Multiplayer.GetMapVals:Invoke() --Has: Map, Script, Button, btnFuncs
- Lib.Button:connect(function(p, bNo) if Lib.btnFuncs[bNo] then Lib.btnFuncs[bNo](bNo, p) end end)
- for i, plr in ipairs(game.Players:GetPlayers()) do
- local char = plr.Character
- local localEvent = char and char:FindFirstChild("LocalEventScript")
- if localEvent then
- localEvent.Disabled = true
- localEvent.Disabled = false
- end
- end
- Lib.Map.Kill.OnServerEvent:Connect(function(plr)
- local char = plr.Character
- local hum = char and char:FindFirstChildOfClass("Humanoid")
- if hum then
- hum.Health = 0
- end
- end)
- Lib.Map.Start:FireAllClients()
- wait(60)
- Lib.Script.setWaterState(Lib.Map.Intro._Water1, "acid")
- wait(15)
- Lib.Script.setWaterState(Lib.Map.Intro._Water1, "lava")
- wait(3)
- Lib.Script.moveWater(Lib.Map.Intro._Water1, Vector3.new(0, 30, 0), 10, true)
- -- LocalEventScript
- local Map = workspace.Multiplayer:WaitForChild("Map")
- local TweenService = game:GetService("TweenService")
- local function moveWater(part, pos, dur, localSpace)
- TweenService:Create(
- part,
- TweenInfo.new(
- dur,
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.Out
- ),
- {
- CFrame = localSpace and part.CFrame * CFrame.new(pos) or part.CFrame + pos
- }
- ):Play()
- end
- Map.Start.OnClientEvent:Wait()
- for i, kb in ipairs(Map:GetDescendants()) do
- if kb.Name == "_Kill" and kb.Parent:IsA("BasePart") then
- kb.Parent.Touched:Connect(function(h)
- local plrTouched = game.Players:GetPlayerFromCharacter(h.Parent)
- if plrTouched and plrTouched == game.Players.LocalPlayer then
- Map.Kill:FireServer()
- end
- end)
- end
- end
- wait(2)
- moveWater(Map.Geometry._Elevator, Vector3.new(0, 30, 0), 10, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement