Advertisement
uor

Untitled

uor
Feb 20th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. --//====================================================\\--
  84. --|| CREATED BY SHACKLUSTER
  85. --\\====================================================//--
  86.  
  87. wait(0.2)
  88.  
  89. Player = owner
  90. PlayerGui = Player.PlayerGui
  91. Cam = workspace.CurrentCamera
  92. Backpack = Player.Backpack
  93. Character = Player.Character
  94. Humanoid = Character.Humanoid
  95. RootPart = Character["HumanoidRootPart"]
  96. Torso = Character["Torso"]
  97. Head = Character["Head"]
  98. RightArm = Character["Right Arm"]
  99. LeftArm = Character["Left Arm"]
  100. RightLeg = Character["Right Leg"]
  101. LeftLeg = Character["Left Leg"]
  102. RootJoint = RootPart["RootJoint"]
  103. Neck = Torso["Neck"]
  104. RightShoulder = Torso["Right Shoulder"]
  105. LeftShoulder = Torso["Left Shoulder"]
  106. RightHip = Torso["Right Hip"]
  107. LeftHip = Torso["Left Hip"]
  108. local sick = Instance.new("Sound",Character)
  109. sick.SoundId = "rbxassetid://1494340971"
  110. sick.Looped = true
  111. sick.Pitch = 1
  112. sick.Volume = 1
  113. sick:Play()
  114.  
  115. IT = Instance.new
  116. CF = CFrame.new
  117. VT = Vector3.new
  118. RAD = math.rad
  119. C3 = Color3.new
  120. UD2 = UDim2.new
  121. BRICKC = BrickColor.new
  122. ANGLES = CFrame.Angles
  123. EULER = CFrame.fromEulerAnglesXYZ
  124. COS = math.cos
  125. ACOS = math.acos
  126. SIN = math.sin
  127. ASIN = math.asin
  128. ABS = math.abs
  129. MRANDOM = math.random
  130. FLOOR = math.floor
  131.  
  132. --//=================================\\
  133. --|| USEFUL VALUES
  134. --\\=================================//
  135.  
  136. Animation_Speed = 3
  137. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  138. local Speed = 25
  139. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  140. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  141. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  142. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  143. local DAMAGEMULTIPLIER = 1
  144. local ANIM = "Idle"
  145. local ATTACK = false
  146. local EQUIPPED = false
  147. local HOLD = false
  148. local COMBO = 1
  149. local Rooted = false
  150. local SINE = 0
  151. local KEYHOLD = false
  152. local CHANGE = 2 / Animation_Speed
  153. local WALKINGANIM = false
  154. local VALUE1 = false
  155. local VALUE2 = false
  156. local ROBLOXIDLEANIMATION = IT("Animation")
  157. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  158. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  159. --ROBLOXIDLEANIMATION.Parent = Humanoid
  160. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  161. WEAPONGUI.Name = "Weapon GUI"
  162. local Effects = IT("Folder", Character)
  163. Effects.Name = "Effects"
  164. local ANIMATOR = Humanoid.Animator
  165. local ANIMATE = Character.Animate
  166. local UNANCHOR = true
  167. local PLAYMAINANIM = true
  168. local BOLTSOUNDS = {168586621,168586586,178452241}
  169.  
  170. --//=================================\\
  171. --\\=================================//
  172.  
  173.  
  174. --//=================================\\
  175. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  176. --\\=================================//
  177.  
  178. ArtificialHB = Instance.new("BindableEvent", script)
  179. ArtificialHB.Name = "ArtificialHB"
  180.  
  181. script:WaitForChild("ArtificialHB")
  182.  
  183. frame = Frame_Speed
  184. tf = 0
  185. allowframeloss = false
  186. tossremainder = false
  187. lastframe = tick()
  188. script.ArtificialHB:Fire()
  189.  
  190. game:GetService("RunService").Heartbeat:connect(function(s, p)
  191. tf = tf + s
  192. if tf >= frame then
  193. if allowframeloss then
  194. script.ArtificialHB:Fire()
  195. lastframe = tick()
  196. else
  197. for i = 1, math.floor(tf / frame) do
  198. script.ArtificialHB:Fire()
  199. end
  200. lastframe = tick()
  201. end
  202. if tossremainder then
  203. tf = 0
  204. else
  205. tf = tf - frame * math.floor(tf / frame)
  206. end
  207. end
  208. end)
  209.  
  210. function ApplyAoE(POSITION,RANGE,FLING,BURN)
  211. local CHILDREN = workspace:GetDescendants()
  212. for index, CHILD in pairs(CHILDREN) do
  213. if CHILD.ClassName == "Model" and CHILD ~= Character then
  214. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  215. if HUM then
  216. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  217. if TORSO then
  218. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  219. CHILD:BreakJoints()
  220. if FLING ~= 0 then
  221. for _, c in pairs(CHILD:GetChildren()) do
  222. if c:IsA("BasePart") and c.Transparency == 0 then
  223. if BURN == true then
  224. Fire(c)
  225. end
  226. local bv = Instance.new("BodyVelocity")
  227. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  228. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  229. bv.Parent = c
  230. Debris:AddItem(bv,0.05)
  231. end
  232. end
  233. end
  234. end
  235. end
  236. end
  237. end
  238. end
  239. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement