reset234567890

Untitled

Jun 17th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.71 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. --use it to stop abusers (By Rufus14)
  148. --owner = game.Players[script.Parent.Name]
  149. heartbeat = game:GetService("RunService").Heartbeat
  150. --Converted with ttyyuu12345's model to script plugin v4
  151. function sandbox(var,func)
  152. local env = getfenv(func)
  153. local newenv = setmetatable({},{
  154. __index = function(self,k)
  155. if k=="script" then
  156. return var
  157. else
  158. return env[k]
  159. end
  160. end,
  161. })
  162. setfenv(func,newenv)
  163. return func
  164. end
  165. cors = {}
  166. mas = Instance.new("Model",game:GetService("Lighting"))
  167. Tool0 = Instance.new("Tool")
  168. Part1 = Instance.new("Part")
  169. SpecialMesh2 = Instance.new("SpecialMesh")
  170. Tool0.Name = "EMP"
  171. Tool0.Parent = mas
  172. Tool0.TextureId = "http://www.roblox.com/asset/?id=28516273"
  173. Tool0.Grip = CFrame.new(-0.100000001, 0, 0, 0, 0, -1, -0, 1, 0, 1, 0, 0)
  174. Tool0.GripForward = Vector3.new(1, -0, -0)
  175. Tool0.GripPos = Vector3.new(-0.100000001, 0, 0)
  176. Tool0.GripRight = Vector3.new(0, -0, 1)
  177. Part1.Name = "Handle"
  178. Part1.Parent = Tool0
  179. Part1.CFrame = CFrame.new(-14.6855946, 1.64969444, 1.09493446, -0.356071234, -0.934458971, -0.000232726336, -0.000399976969, 0.000401377678, -0.999999881, 0.934458852, -0.356070966, -0.00051677227)
  180. Part1.Orientation = Vector3.new(89.9700012, -155.759995, -44.9000015)
  181. Part1.Position = Vector3.new(-14.6855946, 1.64969444, 1.09493446)
  182. Part1.Rotation = Vector3.new(90.0299988, -0.00999999978, 110.860001)
  183. Part1.Size = Vector3.new(0.259999901, 1.43999982, 0.309999973)
  184. Part1.BottomSurface = Enum.SurfaceType.Smooth
  185. Part1.TopSurface = Enum.SurfaceType.Smooth
  186. SpecialMesh2.Parent = Part1
  187. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=28511792"
  188. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  189. SpecialMesh2.VertexColor = Vector3.new(1, 1, 2)
  190. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=28511890"
  191. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  192. for i,v in pairs(mas:GetChildren()) do
  193. v.Parent = workspace
  194. pcall(function() v:MakeJoints() end)
  195. end
  196. mas:Destroy()
  197. for i,v in pairs(cors) do
  198. spawn(function()
  199. pcall(v)
  200. end)
  201. end
  202. Tool0.Parent = owner.Character
  203. canuse = true
  204. local sound = Instance.new("Sound", Part1)
  205. sound.Name = "EMPSounds"
  206. sound.SoundId = "http://www.roblox.com/asset/?id=28518380"
  207. function use()
  208. if canuse then
  209. canuse = false
  210. local user = Tool0.Parent
  211. if user:findFirstChild("Torso") then
  212. local rightarm = Instance.new("Weld", user.Torso)
  213. rightarm.Part0 = user.Torso
  214. rightarm.Part1 = user["Right Arm"]
  215. rightarm.C0 = CFrame.new(1.5, 0.502278805, -0.499994755, 1, 0, 0, 0, -0.00455739861, -0.999989569, 0, 0.999989629, -0.00455739908)
  216. rightarm.Name = "RightArmWeld"
  217. local leftarm = Instance.new("Weld", user.Torso)
  218. leftarm.Part0 = user.Torso
  219. leftarm.Part1 = user["Left Arm"]
  220. leftarm.C0 = CFrame.new(-1.5,0,0)
  221. leftarm.Name = "LeftArmWeld"
  222. for i = 0,0.7 , 0.06 do
  223. rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.43301272, 0.466506481, -0.558012724, 0.866025388, 0, 0.5, 0.433012664, 0.49999997, -0.74999994, -0.25, 0.866025388, 0.433012694),i)
  224. leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5, 0.75, -0.433012724, 0.99999994, 0, 0, 0, -0.5, -0.866025329, 0, 0.866025388, -0.50000006),i)
  225. heartbeat:wait()
  226. end
  227. for i = 0,0.7 , 0.06 do
  228. rightarm.C0 = rightarm.C0:lerp(CFrame.new(0.7997365, 0.807039261, -0.604666471, 0.194529414, 0.595056415, 0.779785991, 0.872452438, 0.258374363, -0.414812416, -0.448313534, 0.761019349, -0.468896985),i)
  229. leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.18681097, 0.763025284, -0.629221201, 0.866025329, -0.492403895, -0.0868238211, -0.249999896, -0.276050836, -0.928060293, 0.433012754, 0.825429797, -0.362167984),i)
  230. heartbeat:wait()
  231. end
  232. end
  233. Part1.EMPSounds.Volume = 1
  234. Part1.EMPSounds.SoundId = "http://www.roblox.com/asset/?id=28518380"
  235. Part1.EMPSounds:Play()
  236. wait(Part1.EMPSounds.TimeLength)
  237. Part1.EMPSounds:Stop()
  238. local soundrandom = math.random(1,2)
  239. if soundrandom == 1 then
  240. Part1.EMPSounds.SoundId = "rbxassetid://335657174"
  241. elseif soundrandom == 2 then
  242. Part1.EMPSounds.SoundId = "rbxassetid://178452217"
  243. end
  244. Part1.EMPSounds:Play()
  245. Part1.EMPSounds.Volume = 3
  246. local function searchforscripts(what)
  247. for i,v in pairs(what:GetChildren()) do
  248. if v.ClassName == "LocalScript" or v.ClassName == "Script" then
  249. v.Disabled = true
  250. end
  251. if v.ClassName == "Sound" and v.Parent.Name ~= "Head" then
  252. v:Stop()
  253. end
  254. searchforscripts(v)
  255. end
  256. end
  257. local function searchforscripts2(what)
  258. for i,v in pairs(what:GetChildren()) do
  259. if v.ClassName == "LocalScript" or v.ClassName == "Script" then
  260. v.Disabled = false
  261. end
  262. if v.ClassName == "Sound" and v.Parent.Name ~= "Head" then
  263. v:Play()
  264. end
  265. searchforscripts2(v)
  266. end
  267. end
  268. for i,v in pairs(workspace:GetChildren()) do
  269. if v.ClassName == "Model" and v ~= user then
  270. local thepart = v:findFirstChildOfClass("Part")
  271. if thepart then
  272. if (thepart.Position - Part1.Position).magnitude <= 120 then
  273. local sparkles = Instance.new("Sparkles", thepart)
  274. sparkles.Name = "punishment"
  275. game.Debris:AddItem(sparkles, 10)
  276. searchforscripts(v)
  277. local function waitforrrthat()
  278. wait(10)
  279. if not thepart:findFirstChild("punishment") then
  280. searchforscripts2(v)
  281. end
  282. end
  283. spawn(waitforrrthat)
  284. end
  285. end
  286. end
  287. end
  288. local function waitforend()
  289. wait(Part1.EMPSounds.TimeLength)
  290. if not Part1.EMPSounds.Playing then
  291. Part1.EMPSounds.Volume = 1
  292. end
  293. end
  294. spawn(waitforend)
  295. local function shake()
  296. for i = 1,20 do
  297. wait()
  298. user:findFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,1,0)
  299. end
  300. end
  301. spawn(shake)
  302. local shockpart = Instance.new("Part", Part1)
  303. shockpart.Anchored = true
  304. shockpart.CanCollide = false
  305. shockpart.Transparency = 0
  306. shockpart.Size = Vector3.new(1,1,1)
  307. shockpart.CFrame = user.Head.CFrame
  308. shockpart.CFrame = (shockpart.CFrame - shockpart.Position) + Vector3.new(Part1.Position.x,Part1.Position.y,Part1.Position.z)
  309. local shockMesh = Instance.new("SpecialMesh")
  310. shockMesh.MeshId = "http://www.roblox.com/asset/?id=54068514"
  311. shockMesh.VertexColor = Vector3.new(0,0,1)
  312. shockMesh.TextureId = "http://www.roblox.com/asset/?id=54068645"
  313. shockMesh.Scale = Vector3.new(1,1,1)
  314. shockMesh.Parent = shockpart
  315. local function resize()
  316. while shockpart.Transparency < 1 do
  317. shockMesh.Scale = shockMesh.Scale + Vector3.new(0.6,0.1,0.6)
  318. shockpart.Transparency = shockpart.Transparency + 0.015
  319. shockpart.CFrame = shockpart.CFrame * CFrame.fromEulerAnglesXYZ(0,0.03,0)
  320. heartbeat:wait()
  321. end
  322. end
  323. spawn(resize)
  324. canuse = true
  325. if user:findFirstChild("Torso") then
  326. for i = 0,0.7 , 0.06 do
  327. user.Torso.RightArmWeld.C0 = user.Torso.RightArmWeld.C0:lerp(CFrame.new(1.5, 0.502278805, -0.499994755, 1, 0, 0, 0, -0.00455739861, -0.999989569, 0, 0.999989629, -0.00455739908),i)
  328. user.Torso.LeftArmWeld.C0 = user.Torso.LeftArmWeld.C0:lerp(CFrame.new(-1.5,0,0),i)
  329. heartbeat:wait()
  330. end
  331. user.Torso.RightArmWeld:destroy()
  332. user.Torso.LeftArmWeld:destroy()
  333. end
  334. end
  335. end
  336. Tool0.Activated:connect(use)
  337. while heartbeat:wait() do
  338. if not Part1:findFirstChild("EMPSounds") then
  339. local sound = Instance.new("Sound", Part1)
  340. sound.SoundId = "http://www.roblox.com/asset/?id=28518380"
  341. sound.Name = "EMPSounds"
  342. end
  343. end
Advertisement
Add Comment
Please, Sign In to add comment