Advertisement
creativenico

Roblox The Streets Remote Script

Jul 26th, 2021
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. -- by fiviefourteen/zxciaz/xaxa
  2. local Players, RService, Uis = game:GetService("Players"), game:GetService("RunService"), game:GetService("UserInputService")
  3. local Client, Mouse, CF, Vec3 = Players.LocalPlayer, Players.LocalPlayer:GetMouse(), CFrame.new, Vector3.new;
  4. local AV, AimPart, Val, Target, Shooting = 10, "Torso", nil, nil, false
  5.  
  6. getgenv().UnEquipTool = function(T)
  7. if Client and Client.Character and Client.Character:FindFirstChild("Humanoid") then
  8. Client.Character.Humanoid:UnequipTools(T)
  9. end
  10. end
  11. getgenv().ShootPlayer = function(Plr)
  12. Shooting = true
  13. local Tool = Client.Character:FindFirstChildWhichIsA("Tool")
  14. if Plr and Plr.Character and Plr.Character:FindFirstChild(AimPart) and not Plr.Character:FindFirstChild("ForceField") and Shooting == true then
  15. Tool.Fire:FireServer(CF(Plr.Character[AimPart].Position) + Plr.Character[AimPart].Velocity/AV + Plr.Character[AimPart].RotVelocity/AV)
  16. end
  17. end
  18.  
  19. Uis.InputBegan:Connect(function(Key)
  20. if not (Uis:GetFocusedTextBox()) then
  21. if Key.KeyCode == Enum.KeyCode.E and Mouse.Target.Parent:FindFirstChild("Humanoid") and Client.Character["Right Arm"]:FindFirstChild("RightGrip") then
  22. Target = Players:GetPlayerFromCharacter(Mouse.Target.Parent)
  23. Client.Character["Right Arm"]["RightGrip"]:Destroy()
  24. getgenv().Tool = Client.Character:FindFirstChildOfClass("Tool");Shooting = true
  25. while Shooting == true and Target and Target.Character and Target.Character:FindFirstChild(AimPart) do
  26. repeat RService.Heartbeat:Wait()
  27. ShootPlayer(Target);Tool.Handle.CFrame = CF(Target.Character[AimPart].Position)
  28. until Target.Character:FindFirstChild("KO") or Target.Character.Humanoid.Health == 0 or Client.Character:FindFirstChild("KO") or Client.Character.Humanoid.Health == 0 or not Tool or Shooting == false
  29. end
  30. if Target.Character:FindFirstChild("KO") or Target.Character.Humanoid.Health == 0 or Client.Character:FindFirstChild("KO") or Client.Character.Humanoid.Health == 0 or not Tool then
  31. Target = nil;Shooting = false;UnEquipTool(Tool)
  32. end
  33. end
  34. end
  35. end)
  36.  
  37.  
  38. setsimulationradius(math.huge, math.huge)
  39. settings()["Physics"].AllowSleep = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement