Advertisement
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 Joseph Deramus")
- 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
- --By Rufus12 (lol jk its Rufus14)
- mouse = game.Players.LocalPlayer:GetMouse()
- used = false
- attacking = false
- smashing = false
- kick = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
- kick.SoundId = "rbxassetid://507150998"
- kick.Volume = 6
- kick1 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
- kick1.SoundId = "rbxassetid://169380525"
- kick1.Volume = 6
- kick11 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
- kick11.SoundId = "rbxassetid://165969964"
- kick11.Volume = 50
- function sensor(key)
- key = key:lower()
- if key == "e" then
- if not used then
- used = true
- local detect = Instance.new("Part", game.Players.LocalPlayer.Character)
- detect.Size = Vector3.new(1,1,4)
- detect:BreakJoints()
- detect.CanCollide = false
- detect.Transparency = 0.9
- detect.BrickColor = BrickColor.new("Really red")
- local weld = Instance.new("Weld", detect)
- weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
- weld.Part1 = detect
- weld.C0 = weld.C0 * CFrame.new(0,-1,0)
- local function attack(part)
- if not attacking then
- attacking = true
- local torso = part.Parent:findFirstChild("Torso")
- if torso ~= nil then
- local humanoid = part.Parent:findFirstChild("Humanoid")
- if humanoid ~= nil then
- local weld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
- humanoid.WalkSpeed = 0
- humanoid.JumpPower = 0
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
- for i = 1,5 do
- wait()
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.2)
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.2,0,0)
- end
- kick:Play()
- used = true
- local bodyvelocity = Instance.new("BodyVelocity", torso)
- bodyvelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 67
- bodyvelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(1.4)
- local bodyposition = Instance.new("BodyPosition", torso)
- bodyposition.Position = torso.Position
- bodyposition.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bodyvelocity:destroy()
- wait(1)
- for i = 1,5 do
- wait()
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.2)
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
- end
- for i = 1,5 do
- wait()
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
- end
- wait(1)
- for i = 1,5 do
- wait()
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.1)
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.1,0,0)
- end
- local bodypositionme = Instance.new("BodyPosition", game.Players.LocalPlayer.Character.Torso)
- bodypositionme.Position = torso.Position
- bodypositionme.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(1.1)
- for i = 1,5 do
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
- end
- kick1:Play()
- bodypositionme:destroy()
- local torsowelding = Instance.new("Weld", torso)
- torsowelding.Part0 = torso
- torsowelding.Part1 = game.Players.LocalPlayer.Character.Torso
- torsowelding.C0 = torsowelding.C0 * CFrame.new(0,0,-2)
- torsowelding.C0 = torsowelding.C0 * CFrame.Angles(0,3.08,0)
- wait(1.3)
- torsowelding:destroy()
- bodyposition:destroy()
- local mybodyvel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso)
- mybodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -90
- mybodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- local bodyvel = Instance.new("BodyVelocity", torso)
- bodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 80
- bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- humanoid.PlatformStand = true
- wait(0.3)
- bodyvel:destroy()
- mybodyvel:destroy()
- wait(0.25)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
- wait(2.5)
- local block = Instance.new("Part", workspace)
- block.Position = torso.Position + Vector3.new(0,500,0)
- block.Size = Vector3.new(50,70,50)
- local function smash()
- if not smashing then
- smashing = true
- local explosion = Instance.new("Explosion", block)
- explosion.BlastRadius = 999999999
- humanoid.Health = 0
- kick11:Play()
- explosion.Position = torso.Position
- wait(1)
- smashing = false
- end
- end
- block.Touched:connect(smash)
- used = false
- attacking = false
- wait(7)
- block:destroy()
- end
- end
- wait(1)
- attacking = false
- end
- end
- detect.Touched:connect(attack)
- wait(0.1)
- detect:destroy()
- used = false
- end
- end
- end
- mouse.KeyDown:connect(sensor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement