Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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 V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- 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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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 every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- --[[
- Explosion God script made by EliteShadow @ V3rm aka Crimsonal @ Roblox
- --]]
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- repeat wait() until Player.Character
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local Torso = Character.Torso
- local Head = Character.Head
- local RightArm = Character["Right Arm"]
- local LeftArm = Character["Left Arm"]
- local RightLeg = Character["Right Leg"]
- local LeftLeg = Character["Left Leg"]
- local Head = Character.Head
- local RightShoulder = Torso["Right Shoulder"]
- local LeftShoulder = Torso["Left Shoulder"]
- local Neck = Torso["Neck"]
- local RightHip = Torso["Right Hip"]
- local LeftHip = Torso["Left Hip"]
- wait(1)
- Instance.new("ForceField", Character)
- local NeckC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- local NeckC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- local LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local LeftHipC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local LeftHipC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local RightHipC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local RightHipC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local Torso = Character.Torso
- local Head = Character.Head
- local mouse = Player:GetMouse()
- local Root = Character.HumanoidRootPart
- local RunService = game:GetService("RunService").RenderStepped
- local Lighting = game:GetService("Lighting")
- Player:ClearCharacterAppearance()
- wait(0.1)
- Player.Character.Head.BrickColor = BrickColor.new("Really black")
- Player.Character.Torso.BrickColor = BrickColor.new("Really black")
- Player.Character["Right Arm"].BrickColor = BrickColor.new("Really black")
- Player.Character["Right Leg"].BrickColor = BrickColor.new("Really black")
- Player.Character["Left Leg"].BrickColor = BrickColor.new("Really black")
- Player.Character["Left Arm"].BrickColor = BrickColor.new("Really black")
- pcall(function() Player.Character.Torso.roblox:Destroy() end)
- z = Instance.new("Sound", Character)
- z.SoundId = "rbxassetid://301463006"--301463006
- z.Looped = true
- z.Pitch = 1
- z.Volume = 1
- wait(.1)
- z:Play()
- local HandCF = CFrame.new(Root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
- local wave = Instance.new("Part", Torso)
- wave.BrickColor = BrickColor.new("Maroon")
- wave.Anchored = true
- wave.CanCollide = false
- wave.Locked = true
- wave.Size = Vector3.new(1, 1, 1)
- wave.TopSurface = "Smooth"
- wave.BottomSurface = "Smooth"
- wave.Transparency = 0.35
- wave.CFrame = HandCF
- wm = Instance.new("SpecialMesh", wave)
- wm.MeshId = "rbxassetid://3270017"
- coroutine.wrap(function()
- for i = 1, 14, 1 do
- wm.Scale = Vector3.new(1 + i*1.1, 1 + i*1.1, 1)
- wave.Size = wm.Scale
- wave.CFrame = HandCF
- wave.Transparency = i/14
- wait()
- end
- wait()
- wave:Destroy()
- end)()
- local function RefreshWelds()
- Neck.C0 = NeckC0
- Neck.C1 = NeckC1
- RightShoulder.C0 = RightShoulderC0
- RightShoulder.C1 = RightShoulderC1
- LeftShoulder.C0 = LeftShoulderC0
- LeftShoulder.C1 = LeftShoulderC1
- RightHip.C0 = RightHipC0
- RightHip.C1 = RightHipC1
- LeftHip.C0 = LeftHipC0
- LeftHip.C1 = LeftHipC1
- end
- local LastArm = "Left"
- local Active = false
- game:GetService("UserInputService").InputBegan:connect(function(Key, Gpe)
- if not Gpe then
- if Key.KeyCode == Enum.KeyCode.F and not Active then
- Active=true
- RefreshWelds()
- Torso.CFrame = CFrame.new(Torso.Position, Vector3.new(Mouse.hit.p.x, Torso.Position.Y, Mouse.hit.p.z))
- Torso.Anchored=true
- Humanoid.PlatformStand = true
- for i = 1,3 do
- RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,-0.2,0.55)
- LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0.2, -0.55)
- end
- local last1
- local last2
- local explosion = Instance.new("Sound", Character)
- explosion.Name="explosion"
- explosion.SoundId = "rbxassetid://2248511"
- explosion:Play()
- game.Debris:AddItem(explosion,10)
- spawn(function()
- for i = 1,15 do
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- game.Debris:AddItem(p,1)
- if not last1 then
- p.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0) * CFrame.new(0,0,-10)
- last1=p
- else
- p.CFrame = last1.CFrame * CFrame.new(0, 0,-i*5)
- last1=p
- end
- local explo = Instance.new("Explosion", workspace)
- explo.Position=p.Position
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- wait()
- end
- end)
- spawn(function()
- for i = 1,15 do
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- game.Debris:AddItem(p,1)
- if not last2 then
- p.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0) * CFrame.new(0,0,-10)
- last2=p
- else
- p.CFrame = last2.CFrame * CFrame.new(0,0 ,-i*5)
- last2=p
- end
- local explo = Instance.new("Explosion", workspace)
- explo.Position=p.Position
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- wait()
- end
- end)
- wait(1)
- Torso.Anchored=false
- Humanoid.PlatformStand = false
- RefreshWelds()
- Active=false
- elseif Key.KeyCode == Enum.KeyCode.C and not Active then
- Active = true
- RefreshWelds()
- Torso.CFrame = CFrame.new(Torso.Position, Vector3.new(Mouse.hit.p.x, Torso.Position.Y, Mouse.hit.p.z))
- Torso.Anchored=true
- Humanoid.PlatformStand = true
- for i = 1,3 do
- RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.5)
- LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0, -0.5)
- wait()
- end
- local last1
- local last2
- local explosion = Instance.new("Sound", Character)
- explosion.Name="explosion"
- explosion.SoundId = "rbxassetid://2248511"
- explosion:Play()
- game.Debris:AddItem(explosion,10)
- spawn(function()
- for i = 1,15 do
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- game.Debris:AddItem(p,1)
- if not last1 then
- p.CFrame = Torso.CFrame * CFrame.new(0,0 ,-i*10)
- last1=p
- else
- p.CFrame = last1.CFrame * CFrame.new(0,0 ,-i*5)
- last1=p
- end
- local explo = Instance.new("Explosion", workspace)
- explo.Position=p.Position
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- wait()
- end
- end)
- spawn(function()
- for i = 1,15 do
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- game.Debris:AddItem(p,1)
- if not last2 then
- p.CFrame = Torso.CFrame * CFrame.new(0,0 ,-i*10)
- last2=p
- else
- p.CFrame = last2.CFrame * CFrame.new(0,0 ,-i*5)
- last2=p
- end
- local explo = Instance.new("Explosion", workspace)
- explo.Position=p.Position
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- wait()
- end
- end)
- wait(1)
- for i = 1,3 do
- RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.5)
- LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0, 0, 0.5)
- wait()
- end
- Torso.Anchored=false
- Humanoid.PlatformStand = false
- RefreshWelds()
- Active=false
- elseif Key.KeyCode == Enum.KeyCode.E and not Active
- then Active = true
- RefreshWelds()
- Torso.Anchored=true
- Humanoid.PlatformStand=true
- if LastArm == "Left" then
- LastArm="Right"
- Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0)
- for i = 1,3 do
- RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.5)
- wait()
- end
- wait(0.5)
- RefreshWelds()
- for i = 1,3 do
- RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.5)
- end
- Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0)
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- p.CFrame = Torso.CFrame * CFrame.new(1.5, 0, -2)
- game.Debris:AddItem(p,3)
- local explosion = Instance.new("Sound", Character)
- explosion.Name="explosion"
- explosion.SoundId = "rbxassetid://2248511"
- explosion:Play()
- game.Debris:AddItem(explosion, 10)
- local explo = Instance.new("Explosion", workspace)
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- explo.Position=p.Position
- elseif LastArm == "Right" then
- LastArm = "Left"
- Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(45), 0)
- for i = 1,3 do
- LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,0.5)
- wait()
- end
- wait(0.5)
- RefreshWelds()
- for i = 1,3 do
- LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,-0.5)
- end
- Torso.CFrame = Torso.CFrame * CFrame.Angles(0, math.rad(-45), 0)
- local p = Instance.new("Part", Character)
- p.Anchored=true
- p.CanCollide=false
- p.Transparency=1
- p.Size=Vector3.new(.1,.1,.1)
- p.Shape = "Ball"
- p.BrickColor = BrickColor.new("Really black")
- p.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, -2)
- game.Debris:AddItem(p,3)
- local explosion = Instance.new("Sound", Character)
- explosion.Name="explosion"
- explosion.SoundId = "rbxassetid://2248511"
- explosion:Play()
- game.Debris:AddItem(explosion, 10)
- local explo = Instance.new("Explosion", workspace)
- explo.BlastPressure = 700000
- explo.BlastRadius=10
- explo.Position=p.Position
- end
- wait(0.5)
- Active = false
- RefreshWelds()
- Torso.Anchored=false
- Humanoid.PlatformStand=false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement