Advertisement
Guest User

roblox bhop script

a guest
Mar 24th, 2020
17,841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. local remoteEvent = Instance.new("RemoteEvent", game.Workspace)
  2. local serverFunctions = {}
  3.  
  4. function serverFunctions.spawnCustom(player)
  5. print(player)
  6. game.Workspace:WaitForChild(player.Name)
  7. game.Workspace[player.Name]:WaitForChild("Humanoid")
  8. local OldCharacter = player.Character
  9. local OldCharacterLocation = OldCharacter.Torso.Position
  10. local NewCharacter = game.ServerStorage.NewCharacter:Clone()
  11. NewCharacter.Name = player.Name
  12. NewCharacter.Parent = game.Workspace
  13.  
  14. local Humanoid = OldCharacter.Humanoid
  15. player.Character = NewCharacter
  16. Humanoid.Parent = NewCharacter
  17. Humanoid.PlatformStand = true
  18. OldCharacter:Destroy()
  19. local SpawnGui = player.PlayerGui:FindFirstChild("SpawnGui")
  20. if SpawnGui ~= nil then
  21. SpawnGui:Destroy()
  22. end
  23.  
  24. NewCharacter:MoveTo(OldCharacterLocation)
  25. end
  26.  
  27. function handleEvent(player, functionName, args)
  28. if serverFunctions[functionName] then
  29. serverFunctions[functionName](player, args)
  30. end
  31. end
  32.  
  33. remoteEvent.OnServerEvent:connect(handleEvent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement