Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local loadstringScript = [[
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local FlyEvent = ReplicatedStorage:FindFirstChild("FlyEvent")
- if not FlyEvent then
- FlyEvent = Instance.new("RemoteEvent", ReplicatedStorage)
- FlyEvent.Name = "FlyEvent"
- end
- local function toggleFly(player, isFlying)
- local character = player.Character
- if character then
- local humanoid = character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- if isFlying then
- humanoid.PlatformStand = true
- character.HumanoidRootPart.Anchored = true
- else
- humanoid.PlatformStand = false
- character.HumanoidRootPart.Anchored = false
- end
- end
- end
- end
- FlyEvent.OnServerEvent:Connect(toggleFly)
- ]]
- loadstring(loadstringScript)()
Advertisement
Advertisement