Advertisement
SxScripting

Skill Giver Server

Feb 11th, 2023
1,121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. local RS = game:GetService("ReplicatedStorage")
  2. local CS = game:GetService("CollectionService")
  3.  
  4. local SoovPushUp: Animation = script.PushUp
  5. local RroPullUp: Animation = script.PullUp
  6. local BloxShaodw: Animation = script.ShadowBoxing
  7.  
  8. local Character1 = workspace.Map.Soovierr
  9. local Character2 = workspace.Map.Rrowipw;
  10. local Character3 = workspace.Map.BloxSennin;
  11.  
  12. local mainTable = {Character1,Character2, Character3}
  13.  
  14. -- PLAYING ANIMATIONS --
  15. Character1:WaitForChild("Humanoid"):LoadAnimation(SoovPushUp):Play()
  16. Character2:WaitForChild("Humanoid"):LoadAnimation(RroPullUp):Play()
  17. Character3:WaitForChild("Humanoid"):LoadAnimation(BloxShaodw):Play()
  18.  
  19. -- MAIN FUNCTIONS/METODS --
  20.  
  21. local function setSpeed(Humanoid: Humanoid, WK: number, JP: number)
  22. Humanoid.WalkSpeed = WK;
  23. Humanoid.JumpPower = JP;
  24. end
  25.  
  26. for Index,Value in pairs(mainTable) do
  27. Value.ProximityPrompt.Triggered:Connect(function(Player)
  28. local RemoteString = "";
  29. if Value.Name == mainTable[1].Name and not CS:HasTag(Player.Character, "StrengthTrainer") then
  30. RemoteString = "StrengthTrainer";
  31. elseif Value.Name == mainTable[2].Name and not CS:HasTag(Player.Character, "MagicTrainer") then
  32. RemoteString = "MagicTrainer";
  33. elseif Value.Name == mainTable[3].Name and not CS:HasTag(Player.Character, "ShadowTrainer") then
  34. RemoteString = "ShadowTrainer";
  35. end
  36. if RemoteString == "" then warn("No Input") return end
  37. RS.Events.PromptSkills:FireClient(Player,RemoteString);
  38. setSpeed(Player.Character:WaitForChild("Humanoid"), 0,0)
  39. end)
  40. end
  41.  
  42. RS.Events.PromptSkills.OnServerEvent:Connect(function(Player, Statement)
  43. print(Statement)
  44. if Statement == "MagicTrainer" and not CS:HasTag(Player.Character, "MagicTrainer") then
  45. CS:AddTag(Player.Character, "MagicTrainer")
  46. elseif Statement == "StrengthTrainer" and not CS:HasTag(Player.Character, "StrengthTrainer") then
  47.  
  48. CS:AddTag(Player.Character, "StrengthTrainer")
  49. local FlashStepTool = RS.Skills["Flash Step"]:Clone()
  50. FlashStepTool.Parent = Player:WaitForChild("Backpack");
  51. elseif Statement == "ShadowTrainer" and not CS:HasTag(Player.Character, "ShadowTrainer") then
  52.  
  53. CS:AddTag(Player.Character, "ShadowTrainer")
  54. local ShadSneakTool = RS.Skills.Wraith:Clone()
  55. ShadSneakTool.Parent = Player:WaitForChild("Backpack");
  56. end
  57. setSpeed(Player.Character:WaitForChild("Humanoid"), 16,50);
  58. end)
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement