Advertisement
GodLite

Element Battles script 2024 (SOLARA)

Jun 5th, 2024 (edited)
1,936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | Science | 0 0
  1. --[[
  2. README! CORRECTLY WORKS ONLY ON SOLARA BETA 3 EXECUTOR!
  3. write in "keys" the number of the key to be pressed ( all keys https://create.roblox.com/docs/reference/engine/enums/KeyCode ).
  4. the numeric keys have already been recorded automatically ( 0 - 9 ).
  5. enable only when the player's character is spawned.
  6. to turn it off, inject it again.
  7.  
  8. ]]--
  9.  
  10. local keys = {
  11.     101 -- it's E key
  12. }
  13.  
  14. local key = "jforu893438274ujfio4" -- change it, if don't work
  15.  
  16. local Player = game.Players.LocalPlayer
  17.  
  18. game.Players:SetAttribute(key, not game.Players:GetAttribute(key))
  19.  
  20. local function keypresstwice(keycode)
  21.     local Character = Player.Character
  22.  
  23.  
  24.     keypress(keycode);
  25.     task.wait(0.05);
  26.     keyrelease(keycode);
  27. end
  28.  
  29.  
  30. while task.wait(0.5) do
  31.     if not game.Players:GetAttribute(key) then oldpartpos = nil; HumanoidRootPart.Anchored = false; break end
  32.  
  33.  
  34.     local Character = Player.Character
  35.     if Character then
  36.         local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  37.         local Humanoid = Character:WaitForChild("Humanoid")
  38.  
  39.         HumanoidRootPart.Anchored = true
  40.     end
  41.  
  42.     for i = 48, 51, 1 do
  43.         keypresstwice(i);
  44.         task.wait(0.7)
  45.     end
  46.     for _, i in pairs(keys) do
  47.         keypresstwice(i);
  48.         task.wait(0.07)
  49.     end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement