Advertisement
helloperson

Untitled

Sep 16th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88. --Saz
  89.  
  90. vPlayer=owner
  91.  
  92. Tool=Instance.new("Tool")
  93. Tool.Name="KILL"
  94. Tool.Parent=vPlayer.Backpack
  95. Handle=Instance.new("Part")
  96. Handle.Size=Vector3.new(2.6,2.6,2.6)
  97. Handle.TopSurface=0
  98. Handle.BottomSurface=0
  99. Handle.Name="Handle"
  100. Handle.formFactor="Custom"
  101. Handle.Parent=Tool
  102. Handle.BrickColor=BrickColor:Red()
  103. Tool.GripRight=Vector3.new(0,0,1)
  104. Tool.GripPos=Vector3.new(-1.08,-.1,.1)
  105.  
  106. m=Instance.new("SpecialMesh")
  107. m.MeshType="FileMesh"
  108. m.MeshId="rbxassetid://434871883"
  109. m.Parent=Handle
  110. m.Scale=Vector3.new(.50,.50,.50)
  111.  
  112. deb=true
  113. onClick=function()
  114. if deb==false then
  115. return
  116. end
  117. deb=false
  118. e=0
  119. rs=vPlayer.Character["Torso"]["Right Shoulder"]
  120.  
  121.  
  122. s=Instance.new("Sound")
  123. s.SoundId="http://www.roblox.com/asset/?id=622342161"
  124. s.Volume=1
  125. s.Parent=Tool.Handle
  126. s:Play()
  127. game:GetService("Debris"):AddItem(s,5)
  128. wait(0.1)
  129. lolol=rs.C0
  130. for i=1, 4 do
  131. rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,math.rad(30))
  132. wait(.031)
  133. end
  134. for i=1, 2 do
  135. rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,-math.rad(30))
  136. wait(.031)
  137. end
  138. --throw
  139. hh=Tool.Handle:clone()
  140. Tool.Handle.Transparency=1
  141. hh.CanCollide=true
  142. hh.Parent=workspace
  143. hh.Velocity=dir*200+Vector3.new(0,5,0)
  144. ff=Instance.new("BodyForce")
  145. ff.force=Vector3.new(0,hh:GetMass()*140,0)
  146. ff.Parent=hh
  147. for i=1, 2 do
  148. rs.C0=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,-math.rad(30))
  149. hh.Velocity=dir*300
  150. wait(.031)
  151. end
  152. hh.Touched:connect(function(hit)
  153. if hit==nil then return end
  154. if hit.Parent==nil then return end
  155. if hit.Parent:FindFirstChild("Humanoid")~=nil and hh:FindFirstChild("Hit")==nil
  156. if hit.Parent==owner
  157. hit.Parent:BreakJoints()
  158. s=Instance.new("Sound")
  159. s.Volume=1
  160. s.Parent=hh
  161. s.Name="Hit1"
  162. s.SoundId="http://www.roblox.com/asset/?id=970428619"
  163. s:Play()
  164.  
  165. for i=1, 4 do
  166. s5=Instance.new("Sound")
  167. s5.Volume=1
  168. s5.Parent=hh
  169. s5.Name="Hit"
  170. s5.SoundId="http://www.roblox.com/asset/?id=970428619"
  171. s5.Pitch=.85
  172. s5:Play()
  173. end
  174.  
  175. for _,v in pairs(hit.Parent:children()) do
  176. if v:IsA("BasePart") then
  177. v.Velocity=(v.Position - hh.Position).unit * 90 + Vector3.new(math.random(-20,20),math.random(0,20),math.random(-20,20))
  178. v.RotVelocity=-v.Velocity * 1.2
  179. end
  180. end
  181.  
  182. hh.Transparency=1
  183. for i=1, 30 do
  184. p=Instance.new("Part")
  185. p.TopSurface=0
  186. p.BottomSurface=0
  187. p.Name="Shard"
  188. p.CFrame=hh.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) + Vector3.new(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10)
  189. p.BrickColor=hh.BrickColor
  190. p.CanCollide=false
  191. p.formFactor="Custom"
  192. p.Size=Vector3.new(10,10,10)
  193. if math.random(1,3)==1 then
  194. m=Instance.new("BlockMesh")
  195. m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
  196. m.Parent=p
  197. else
  198. m=Instance.new("SpecialMesh")
  199. m.MeshType="Wedge"
  200. m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
  201. m.Parent=p
  202. end
  203. p.RotVelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  204. p.Velocity=p.RotVelocity + Vector3.new(0,25,0) + hh.Velocity / 6
  205. p.Parent=workspace
  206. end
  207.  
  208. hh.Anchored=true
  209.  
  210. end
  211. if hit.Parent:FindFirstChild("Humanoid")==nil and hh:FindFirstChild("Hit")==nil and hit.CanCollide==true then
  212. hh.Transparency=1
  213. for i=1, 30 do
  214. p=Instance.new("Part")
  215. p.TopSurface=0
  216. p.BottomSurface=0
  217. p.Name="Shard"
  218. p.CFrame=hh.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) + Vector3.new(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10)
  219. p.BrickColor=hh.BrickColor
  220. p.CanCollide=false
  221. p.formFactor="Custom"
  222. p.Size=Vector3.new(10,10,10)
  223. if math.random(1,3)==1 then
  224. m=Instance.new("BlockMesh")
  225. m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
  226. m.Parent=p
  227. else
  228. m=Instance.new("SpecialMesh")
  229. m.MeshType="Wedge"
  230. m.Scale=Vector3.new(math.random(10,15)/10,.2,math.random(10,15)/10)
  231. m.Parent=p
  232. end
  233. p.RotVelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  234. p.Velocity=p.RotVelocity + Vector3.new(0,25,0) + hh.Velocity / 6
  235. p.Parent=workspace
  236. end
  237. for i=1, 4 do
  238. s5=Instance.new("Sound")
  239. s5.Volume=5
  240. s5.Parent=hh
  241. s5.Name="Hit"
  242. s5.SoundId="http://www.roblox.com/asset/?id=970428619"
  243. s5.Pitch=.85
  244. s5:Play()
  245. end
  246. hh.Anchored=true
  247. end
  248. end)
  249. game:GetService("Debris"):AddItem(hh,5)
  250. wait(1.0)
  251. Tool.Handle.Transparency=0
  252. deb=true
  253. end
  254. Tool.Activated:connect(onClick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement