Advertisement
lV0rd

kb client

Mar 14th, 2024
732
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local module = {}
  2.  
  3. local plrService = game:GetService('Players')
  4. local player = plrService.LocalPlayer
  5. local camera = workspace.CurrentCamera
  6. local character = player.Character or player.CharacterAdded:Wait()
  7.  
  8. local humanoid: Humanoid = character:WaitForChild("Humanoid")
  9. local hrp: BasePart = character:WaitForChild("HumanoidRootPart")
  10.  
  11. local repStorage = game:GetService("ReplicatedStorage")
  12. local remote = repStorage.Remotes.Events.KB
  13.  
  14. module.Init = function()
  15.     remote.OnClientEvent:Connect(function(kb, tipe)
  16.         if tipe == "b" then
  17.             local fecForce = script.BodyVelocity:Clone()
  18.             fecForce.MaxForce = Vector3.new(math.huge,0,math.huge)
  19.             fecForce.Parent = character
  20.             fecForce.Velocity = kb
  21.  
  22.             game.Debris:AddItem(fecForce, .3)
  23.  
  24.         end
  25.     end)
  26. end
  27.  
  28. return module
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement