Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- -- turn oldpos to false if you don't want to teleport back to original position, true if you do.
- oldpos = false
- Status = false
- plr.Chatted:Connect(function(msg)
- if string.sub(msg, 1, 9) == "/e toggle" then
- if Status == false then
- position = plr.Character.HumanoidRootPart.Position
- X = game.workspace.ObjectSelection.FuelRocket.Part.Position
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = X
- Status = true
- else
- if oldpos == true then
- Status = false
- plr.Character.HumanoidRootPart.Position = position
- else
- Status = false
- print("not going back")
- end
- end
- while Status do
- while Status == true do
- workspace.ObjectSelection.TakeFuel.TakeFuel.TakeFuel.Event:FireServer()
- workspace.ObjectSelection.FuelRocket.FuelRocket.FuelRocket.Event:FireServer()
- X = game.workspace.ObjectSelection.FuelRocket.Part.Position
- if (game.workspace.ObjectSelection.FuelRocket.Part.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude > 10 then
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = game.Workspace.ObjectSelection.FuelRocket.Part.Position
- else
- print("good boy")
- end
- wait(0.1)
- end
- while Status do
- while Status == true do
- if game.workspace.ObjectSelection.FuelRocket.Screen.GUI.Fuel.Text == '100%' then
- plr.Character.HumanoidRootPart.Position = game.workspace.ObjectSelection.Deagle.Deagle
- game.workspace.ObjectSelection.Deagle.Deagle.Deagle.Event:FireServer()
- wait(0.5)
- plr.Character.HumanoidRootPart.Position = game.workspace.ObjectSelection.LaunchRocket.Part.Position
- game.workspace.ObjectSelection.LaunchRocket.NoLever.LaunchRocket.Event:FireServer()
- wait(10)
- for _,v in pairs(game.workspace.Cluckles:GetChildren()) do
- if v.Name == Torso then
- ReplicatedStorage.Event:FireServer(
- "ShootGun",
- plr,
- v,
- "Deagle",
- 28,
- 2.2
- )
- else
- print("Not Yet")
- end
- end
- end
- end
- end
- end
- end
- end)
- if oldpos == true then
- local tbl_3951E9C0 =
- {
- ["Delay"] = 5,
- ["Text"] = "Loaded. Type /e Toggle To Toggle. Saving Old Position."
- }
- local tbl_39521BD0 =
- {
- tbl_3951E9C0
- }
- local tbl_main =
- {
- "Dialogue",
- tbl_39521BD0
- }
- game:GetService("ReplicatedStorage").Event:FireServer(unpack(tbl_main))
- else
- local tbl_3951E9C0 =
- {
- ["Delay"] = 5,
- ["Text"] = "Loaded. Type /e Toggle To Toggle. Not Saving Old Position."
- }
- local tbl_39521BD0 =
- {
- tbl_3951E9C0
- }
- local tbl_main =
- {
- "Dialogue",
- tbl_39521BD0
- }
- game:GetService("ReplicatedStorage").Event:FireServer(unpack(tbl_main))
- end
Advertisement
Add Comment
Please, Sign In to add comment