Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local FlyS = true
- game.Players.LocalPlayer.PlayerGui.Chat.Frame.ChatChannelParentFrame.Frame_MessageLogDisplay.Scroller.ChildAdded:connect(function(v)
- wait()
- if v.TextLabel:FindFirstChild("TextButton") then
- local Plr
- for a,b in pairs(game.Players:GetPlayers()) do
- if string.find(v.TextLabel.TextButton.Text, b.Name) then
- Plr = b.Name
- end
- end
- if Plr == game.Players.LocalPlayer.Name then
- if string.find(v.TextLabel.Text, "WipeTrees_") then
- for i,v in pairs(game.Workspace:GetDescendants()) do
- if v:FindFirstChild("WoodSection") then
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
- game.ReplicatedStorage.Interaction.DestroyStructure:FireServer(v)
- end
- end
- end
- if string.find(v.TextLabel.Text, "ABuy_On") then
- repeat
- for i,v in pairs(game.Workspace.Stores:GetChildren()) do
- if v.Name == "ShopItems" or string.find(v.Name, "_") then
- for c,d in pairs(v:GetChildren()) do
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(d)
- end
- wait(0.1)
- end
- end
- until game.ReplicatedStorage:FindFirstChild("Part")
- game.ReplicatedStorage.Part:Destroy()
- for i,v in pairs(game.Workspace.Stores:GetDescendants()) do
- if v.Parent.Name == "ShopItems" or string.find(v.Parent.Name, "_") then
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
- game.ReplicatedStorage.Interaction.DestroyStructure:FireServer(v)
- end
- end
- end
- if string.find(v.TextLabel.Text, "ABuy_Off") then
- if not game.ReplicatedStorage:FindFirstChild("Part") then
- local Part = Instance.new("Part", game.ReplicatedStorage)
- end
- end
- if string.find(v.TextLabel.Text, "LSI_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(1)
- end
- if string.find(v.TextLabel.Text, "LSII_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(2)
- end
- if string.find(v.TextLabel.Text, "LSIII_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(3)
- end
- if string.find(v.TextLabel.Text, "LSIV_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(4)
- end
- if string.find(v.TextLabel.Text, "LSV_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(5)
- end
- if string.find(v.TextLabel.Text, "LSVI_") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(6)
- end
- if string.find(v.TextLabel.Text, "RS") then
- game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(game.Players.LocalPlayer.CurrentSaveSlot.Value)
- end
- if string.find(v.TextLabel.Text, "DupeM") then
- game.ReplicatedStorage.Transactions.ClientToServer.Donate:InvokeServer(game.Players.LocalPlayer, game.Players.LocalPlayer.leaderstats.Money.Value, 1)
- end
- if string.find(v.TextLabel.Text, "OBridge") then
- for i=1,3 do
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Bridge.TollBooth0.Seranok,
- ["Name"] = "Seranok",
- ["ID"] = 7,
- ["Dialog"] = game:GetService("Workspace").Bridge.TollBooth0.Seranok.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- end
- end
- if string.find(v.TextLabel.Text, "BuyQuest_") then
- local A_1 =
- {
- ["Character"] = game.Workspace.Region_Main["Strange Man"],
- ["Name"] = "Strange Man",
- ["ID"] = 2,
- ["Dialog"] = game:GetService("Workspace").Stores.WoodRUs.Thom.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- end
- if string.find(v.TextLabel.Text, "GetBP") then
- for i,v in pairs(game.ReplicatedStorage.Purchasables.Structures.BlueprintStructures:GetChildren()) do
- if not game.Players.LocalPlayer.PlayerBlueprints.Blueprints:FindFirstChild(v.Name) then
- local clone = v:Clone()
- clone.Parent = game.Players.LocalPlayer.PlayerBlueprints.Blueprints
- end
- end
- end
- if string.find(v.TextLabel.Text, "Fly") then
- if FlyS == true then
- FlyS = false
- repeat wait()
- until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
- local mouse = game.Players.LocalPlayer:GetMouse()
- repeat wait() until mouse
- local plr = game.Players.LocalPlayer
- local torso = plr.Character.Torso
- local flying = true
- local deb = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 50
- local speed = 0
- function Fly()
- local bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- local bv = Instance.new("BodyVelocity", torso)
- bv.velocity = Vector3.new(0,0.1,0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- repeat wait()
- plr.Character.Humanoid.PlatformStand = true
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed+.5+(speed/maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
- speed = speed-1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- else
- bv.velocity = Vector3.new(0,0.1,0)
- end
- bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
- until not flying
- ctrl = {f = 0, b = 0, l = 0, r = 0}
- lastctrl = {f = 0, b = 0, l = 0, r = 0}
- speed = 0
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- end
- mouse.KeyDown:connect(function(key)
- if key:lower() == "f" then
- if flying == true then
- flying = false
- else
- flying = true
- Fly()
- end
- elseif key:lower() == "w" then
- ctrl.f = 1
- elseif key:lower() == "s" then
- ctrl.b = -1
- elseif key:lower() == "a" then
- ctrl.l = -1
- elseif key:lower() == "d" then
- ctrl.r = 1
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key:lower() == "w" then
- ctrl.f = 0
- elseif key:lower() == "s" then
- ctrl.b = 0
- elseif key:lower() == "a" then
- ctrl.l = 0
- elseif key:lower() == "d" then
- ctrl.r = 0
- end
- end)
- Fly()
- end
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment