Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has convert to FE by who i don't know?
- -----------------------------------------------------
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- --use it to stop abusers (By Rufus14)
- --owner = game.Players[script.Parent.Name]
- heartbeat = game:GetService("RunService").Heartbeat
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Tool0.Name = "EMP"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=28516273"
- Tool0.Grip = CFrame.new(-0.100000001, 0, 0, 0, 0, -1, -0, 1, 0, 1, 0, 0)
- Tool0.GripForward = Vector3.new(1, -0, -0)
- Tool0.GripPos = Vector3.new(-0.100000001, 0, 0)
- Tool0.GripRight = Vector3.new(0, -0, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- 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)
- Part1.Orientation = Vector3.new(89.9700012, -155.759995, -44.9000015)
- Part1.Position = Vector3.new(-14.6855946, 1.64969444, 1.09493446)
- Part1.Rotation = Vector3.new(90.0299988, -0.00999999978, 110.860001)
- Part1.Size = Vector3.new(0.259999901, 1.43999982, 0.309999973)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=28511792"
- SpecialMesh2.Scale = Vector3.new(2, 2, 2)
- SpecialMesh2.VertexColor = Vector3.new(1, 1, 2)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=28511890"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- Tool0.Parent = owner.Character
- canuse = true
- local sound = Instance.new("Sound", Part1)
- sound.Name = "EMPSounds"
- sound.SoundId = "http://www.roblox.com/asset/?id=28518380"
- function use()
- if canuse then
- canuse = false
- local user = Tool0.Parent
- if user:findFirstChild("Torso") then
- local rightarm = Instance.new("Weld", user.Torso)
- rightarm.Part0 = user.Torso
- rightarm.Part1 = user["Right Arm"]
- rightarm.C0 = CFrame.new(1.5, 0.502278805, -0.499994755, 1, 0, 0, 0, -0.00455739861, -0.999989569, 0, 0.999989629, -0.00455739908)
- rightarm.Name = "RightArmWeld"
- local leftarm = Instance.new("Weld", user.Torso)
- leftarm.Part0 = user.Torso
- leftarm.Part1 = user["Left Arm"]
- leftarm.C0 = CFrame.new(-1.5,0,0)
- leftarm.Name = "LeftArmWeld"
- for i = 0,0.7 , 0.06 do
- 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)
- 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)
- heartbeat:wait()
- end
- for i = 0,0.7 , 0.06 do
- 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)
- 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)
- heartbeat:wait()
- end
- end
- Part1.EMPSounds.Volume = 1
- Part1.EMPSounds.SoundId = "http://www.roblox.com/asset/?id=28518380"
- Part1.EMPSounds:Play()
- wait(Part1.EMPSounds.TimeLength)
- Part1.EMPSounds:Stop()
- local soundrandom = math.random(1,2)
- if soundrandom == 1 then
- Part1.EMPSounds.SoundId = "rbxassetid://335657174"
- elseif soundrandom == 2 then
- Part1.EMPSounds.SoundId = "rbxassetid://178452217"
- end
- Part1.EMPSounds:Play()
- Part1.EMPSounds.Volume = 3
- local function searchforscripts(what)
- for i,v in pairs(what:GetChildren()) do
- if v.ClassName == "LocalScript" or v.ClassName == "Script" then
- v.Disabled = true
- end
- if v.ClassName == "Sound" and v.Parent.Name ~= "Head" then
- v:Stop()
- end
- searchforscripts(v)
- end
- end
- local function searchforscripts2(what)
- for i,v in pairs(what:GetChildren()) do
- if v.ClassName == "LocalScript" or v.ClassName == "Script" then
- v.Disabled = false
- end
- if v.ClassName == "Sound" and v.Parent.Name ~= "Head" then
- v:Play()
- end
- searchforscripts2(v)
- end
- end
- for i,v in pairs(workspace:GetChildren()) do
- if v.ClassName == "Model" and v ~= user then
- local thepart = v:findFirstChildOfClass("Part")
- if thepart then
- if (thepart.Position - Part1.Position).magnitude <= 120 then
- local sparkles = Instance.new("Sparkles", thepart)
- sparkles.Name = "punishment"
- game.Debris:AddItem(sparkles, 10)
- searchforscripts(v)
- local function waitforrrthat()
- wait(10)
- if not thepart:findFirstChild("punishment") then
- searchforscripts2(v)
- end
- end
- spawn(waitforrrthat)
- end
- end
- end
- end
- local function waitforend()
- wait(Part1.EMPSounds.TimeLength)
- if not Part1.EMPSounds.Playing then
- Part1.EMPSounds.Volume = 1
- end
- end
- spawn(waitforend)
- local function shake()
- for i = 1,20 do
- wait()
- user:findFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,1,0)
- end
- end
- spawn(shake)
- local shockpart = Instance.new("Part", Part1)
- shockpart.Anchored = true
- shockpart.CanCollide = false
- shockpart.Transparency = 0
- shockpart.Size = Vector3.new(1,1,1)
- shockpart.CFrame = user.Head.CFrame
- shockpart.CFrame = (shockpart.CFrame - shockpart.Position) + Vector3.new(Part1.Position.x,Part1.Position.y,Part1.Position.z)
- local shockMesh = Instance.new("SpecialMesh")
- shockMesh.MeshId = "http://www.roblox.com/asset/?id=54068514"
- shockMesh.VertexColor = Vector3.new(0,0,1)
- shockMesh.TextureId = "http://www.roblox.com/asset/?id=54068645"
- shockMesh.Scale = Vector3.new(1,1,1)
- shockMesh.Parent = shockpart
- local function resize()
- while shockpart.Transparency < 1 do
- shockMesh.Scale = shockMesh.Scale + Vector3.new(0.6,0.1,0.6)
- shockpart.Transparency = shockpart.Transparency + 0.015
- shockpart.CFrame = shockpart.CFrame * CFrame.fromEulerAnglesXYZ(0,0.03,0)
- heartbeat:wait()
- end
- end
- spawn(resize)
- canuse = true
- if user:findFirstChild("Torso") then
- for i = 0,0.7 , 0.06 do
- 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)
- user.Torso.LeftArmWeld.C0 = user.Torso.LeftArmWeld.C0:lerp(CFrame.new(-1.5,0,0),i)
- heartbeat:wait()
- end
- user.Torso.RightArmWeld:destroy()
- user.Torso.LeftArmWeld:destroy()
- end
- end
- end
- Tool0.Activated:connect(use)
- while heartbeat:wait() do
- if not Part1:findFirstChild("EMPSounds") then
- local sound = Instance.new("Sound", Part1)
- sound.SoundId = "http://www.roblox.com/asset/?id=28518380"
- sound.Name = "EMPSounds"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment