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;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end -- [ No Time To Explain! ] --
- -- [ Burst Gun ] --
- wait()
- Music = true
- Player = game.Players.LocalPlayer
- c = game.Players.LocalPlayer.Character
- Head = c.Head
- anim = c.Humanoid.Animator
- Shot = false
- Battle = false
- p = game.Players.LocalPlayer
- Music = false
- PhaseEnabled = true
- TeleportEnabled = true
- local Effects = {}
- attack = false
- local attacking = false
- vt = Vector3.new
- bc = BrickColor.new
- br = BrickColor.random
- it = Instance.new
- cf = CFrame.new
- euler = CFrame.fromEulerAnglesXYZ
- angles = CFrame.Angles
- matr = math.random
- mouse = Player:GetMouse()
- c.Humanoid.WalkSpeed = 24 c.Humanoid.JumpPower = 50
- RA = c["Right Arm"]
- RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- RS = c.Torso:FindFirstChild("Right Shoulder")
- LS = c.Torso:FindFirstChild("Left Shoulder")
- RH = c.Torso:FindFirstChild("Right Hip")
- LH = c.Torso:FindFirstChild("Left Hip")
- RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
- N = c.Torso:FindFirstChild("Neck")
- cf = CFrame.new
- ang = CFrame.Angles
- rd = math.rad
- rd2 = math.random
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.Heartbeat:wait(0)
- else
- for i=0,num do
- game:service'RunService'.Heartbeat:wait(0)
- end
- end
- end
- local Music = Instance.new("Sound",c.HumanoidRootPart)Music.SoundId = "rbxassetid://359311553" Music.Volume = 0.5 Music.Looped = true Music:Play()
- RS.Name = "RightShoulds"
- RA2 = RA:clone() RA2.Name = "RightArm"
- RA.Parent = nil
- RS.Parent = nil
- wait()
- RA2.Parent = c
- RS = Instance.new("Motor6D",c.Torso)RS.Part0 = c.Torso RS.Part1 = RA2 RS.C0 = RSC0 RS.C1 = RSC1 RS.Name = "Right Shoulder"
- RSM = Instance.new("SpecialMesh",RA2)RSM.MeshId = "rbxassetid://430080097"
- local RightGun = Instance.new("Part",c)RightGun.Size = Vector3.new(0.4,1.4,4)RightGun.CanCollide = false RightGun.Anchored = false RightGun.Name = "BlastBow" RightGun.Archivable = false
- local RightM = Instance.new("SpecialMesh",RightGun)RightM.MeshId = "rbxassetid://477037714" RightM.TextureId = "rbxassetid://477037796" RightM.Scale = Vector3.new(0.06,0.04,0.02)
- local RightW = Instance.new("Weld",c["RightArm"])RightW.Part0 = c["RightArm"] RightW.Part1 = RightGun RightW.C0 = CFrame.new(0,-2,-0.25)*CFrame.Angles(math.rad(-90),0,0)
- local Hood = Instance.new("Part",c)Hood.Size = Vector3.new(0.2,0.2,0.2)Hood.Color = Color3.new(42/255,42/255,42/255)
- local HM = Instance.new("SpecialMesh",Hood)HM.MeshId = "rbxassetid://15393065" HM.Scale = Vector3.new(0.95,1,0.95)
- local HW = Instance.new("Weld",c.Head)HW.Part0 = c.Head HW.Part1 = Hood HW.C0 = CFrame.new(0,0.25,0)
- for _, c in pairs(c:children()) do
- if c.className == "Accessory" then
- c.Parent = nil
- end
- end
- c.Head.face:remove()
- local Rubble = Instance.new("Sound",c.HumanoidRootPart)Rubble.SoundId = "rbxassetid://172019967" Rubble.Volume = 0 Rubble.Looped = true
- function lerpz(joint, prop, cfrmz, alp)
- joint[prop] = joint[prop]:lerp(cfrmz, alp)
- end
- function resetlerp()
- RJ.C0 = RJC0
- RJ.C1 = RJC1
- N.C0 = NC0
- N.C1 = NC1
- RS.C0 = RSC0
- RS.C1 = RSC1
- LS.C0 = LSC0
- LS.C1 = LSC1
- RH.C0 = RHC0
- RH.C1 = RHC1
- LH.C0 = LHC0
- LH.C1 = LHC1
- end
- game:GetService('UserInputService').InputBegan:connect(function(InputObj)
- if InputObj.KeyCode == Enum.KeyCode.Slash then
- local finishEvent = nil
- isTyping = true
- finishEvent = game:GetService('UserInputService').InputBegan:connect(function(InputObj)
- if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
- isTyping = false
- finishEvent:disconnect()
- end
- end)
- end
- end)
- Ded = false
- Deboun = false
- for i,v in pairs(c:children()) do
- if v.ClassName == "Part" then
- v.Touched:connect(function(Hit)
- if Hit.Parent ~= c and Hit.Name ~= "touchy" then
- if v.Velocity.Y >= 150 or v.Velocity.Y <= -150 or v.Velocity.Z >= 150 or v.Velocity.Z <= -150 or v.Velocity.X >= 150 or v.Velocity.X <= -150 then
- if v.Velocity.Y >= 50 or v.Velocity.Y <= -50 then
- if Hit.Parent:findFirstChild("Humanoid")== nil then
- local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://779129548" S.Volume = 3 S.PlaybackSpeed = 1 S:Play()
- v.Velocity = Vector3.new(10,10,10)
- for i = 1,4 do
- local Sizez = math.random(30,60)/10
- local Partz = Instance.new("Part",game.Workspace) Partz.Parent = game.Workspace Partz.Material = Hit.Material Partz.BrickColor = Hit.BrickColor Partz.Size = Vector3.new(Sizez,Sizez,Sizez)
- Partz.CanCollide = false Partz.Anchored = false Partz.CFrame = CFrame.new(v.Position)*CFrame.Angles(math.random(-90,90),math.random(-90,90),math.random(-90,90))
- local BV = Instance.new("BodyVelocity",Partz)BV.maxForce = Vector3.new(math.huge,math.huge,math.huge) Partz.Name = "touchy"
- BV.velocity = Vector3.new(math.random(-90,90),5,math.random(-90,90))game.Debris:AddItem(BV,0.1)
- end
- Ded = true wait(4) Ded = false
- end
- else
- if Hit.Parent:findFirstChild("Humanoid")== nil and Deboun == false then Deboun = true
- local Sizez = math.random(30,60)/10 Rubble.Volume = 3
- local Partz = Instance.new("Part",game.Workspace) Partz.Parent = game.Workspace Partz.Material = Hit.Material Partz.BrickColor = Hit.BrickColor Partz.Size = Vector3.new(Sizez,Sizez,Sizez)
- Partz.CanCollide = false Partz.Anchored = true Partz.CFrame = CFrame.new(v.Position)*CFrame.Angles(math.random(-90,90),math.random(-90,90),math.random(-90,90))game.Debris:AddItem(Partz,5)
- swait() Deboun = false
- end
- end
- elseif v.Velocity.Y >= 75 or v.Velocity.Y <= -75 or v.Velocity.Z >= 75 or v.Velocity.Z <= -75 or v.Velocity.X >= 75 or v.Velocity.X <= -75 then
- local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://179760759" S.Volume = 10 S.PlaybackSpeed = math.random(6,8)/10 S:Play()
- v.Velocity = Vector3.new(1,1,1)
- Ded = true wait(2) Ded = false
- end
- Rubble.Volume = 0
- end
- end)
- end
- end
- function makegloo(paren, co, ci, parto, parti, nam) local gloo = Instance.new("Glue") gloo.Name = nam gloo.C0 = co gloo.C1 = ci gloo.Part0 = parto gloo.Part1 = parti gloo.Parent = paren end
- function maketouchy(parent, limb, cframe) local pr = Instance.new("Part") pr.Name = "touchy" pr.Size = Vector3.new(1, 1, 1) pr.Transparency = 1 pr.CustomPhysicalProperties = PhysicalProperties.new(0.55, 0.3, 0.5) pr.CanCollide = true pr.Anchored = false pr.Parent = parent local w = Instance.new("Weld") w.Part0 = pr w.Part1 = limb w.C0 = cframe w.Parent = pr end
- function makejoint(paren, co, ci, parto, parti, nam)local gloo = Instance.new("Motor6D")gloo.Name = nam gloo.C0 = co gloo.C1 = ci gloo.Part0 = parto gloo.Part1 = parti gloo.Parent = paren end
- function RagBlast(cactus)
- cactus.Humanoid.PlatformStand = true Shot = true
- local BV = Instance.new("BodyVelocity",c.HumanoidRootPart)BV.Velocity = RightGun.CFrame.lookVector*-400 BV.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait() BV:remove()
- if cactus["RightArm"]~=nil and cactus.Torso:FindFirstChild("Right Shoulder") then
- cactus.Torso:FindFirstChild("Right Shoulder"):Destroy()
- makegloo(cactus.Torso, RSC0, RSC1, cactus.Torso, cactus["RightArm"], "Right Shoulder")
- maketouchy(cactus["RightArm"], cactus["RightArm"], CFrame.new(0, 0.5, 0))
- end
- if cactus["Left Arm"]~=nil and cactus.Torso:FindFirstChild("Left Shoulder") then
- cactus.Torso:FindFirstChild("Left Shoulder"):Destroy()
- makegloo(cactus.Torso, LSC0, LSC1, cactus.Torso, cactus["Left Arm"], "Left Shoulder")
- maketouchy(cactus["Left Arm"], cactus["Left Arm"], CFrame.new(0, 0.5, 0))
- end
- if cactus["Right Leg"]~=nil and cactus.Torso:FindFirstChild("Right Hip") then
- cactus.Torso:FindFirstChild("Right Hip"):Destroy()
- makegloo(cactus.Torso, RHC0, RHC1, cactus.Torso, cactus["Right Leg"], "Right Hip")
- maketouchy(cactus["Right Leg"], cactus["Right Leg"], CFrame.new(0, 0.5, 0))
- end
- if cactus["Left Leg"]~=nil and cactus.Torso:FindFirstChild("Left Hip") then
- cactus.Torso:FindFirstChild("Left Hip"):Destroy()
- makegloo(cactus.Torso, LHC0, LHC1, cactus.Torso, cactus["Left Leg"], "Left Hip")
- maketouchy(cactus["Left Leg"], cactus["Left Leg"], CFrame.new(0, 0.5, 0))
- end
- local rag = true
- while rag == true do
- c.Humanoid.PlatformStand = true if Shot == false then break end
- if c.HumanoidRootPart.Velocity.Y < 0.5 and c.HumanoidRootPart.Velocity.Y > -0.5
- and c.HumanoidRootPart.Velocity.X < 1 and c.HumanoidRootPart.Velocity.X > -1
- and c.HumanoidRootPart.Velocity.Z < 1 and c.HumanoidRootPart.Velocity.Z > -1
- and Ded == false then rag = false break end
- wait()
- end
- if c.Humanoid.PlatformStand == true then c.Humanoid.Jump = true c.Humanoid.PlatformStand = false end
- Shot = false
- if cactus["RightArm"] and cactus.Torso:FindFirstChild("Right Shoulder") then
- cactus.Torso:FindFirstChild("Right Shoulder"):Destroy()
- makejoint(cactus.Torso, RSC0, RSC1, cactus.Torso, cactus["RightArm"], "Right Shoulder")
- cactus["RightArm"]:FindFirstChild("touchy"):Destroy()
- end
- if cactus["Left Arm"] and cactus.Torso:FindFirstChild("Left Shoulder") then
- cactus.Torso:FindFirstChild("Left Shoulder"):Destroy()
- makejoint(cactus.Torso, LSC0, LSC1, cactus.Torso, cactus["Left Arm"], "Left Shoulder")
- cactus["Left Arm"]:FindFirstChild("touchy"):Destroy()
- end
- if cactus["Right Leg"] and cactus.Torso:FindFirstChild("Right Hip") then
- cactus.Torso:FindFirstChild("Right Hip"):Destroy()
- makejoint(cactus.Torso, RHC0, RHC1, cactus.Torso, cactus["Right Leg"], "Right Hip")
- cactus["Right Leg"]:FindFirstChild("touchy"):Destroy()
- end
- if cactus["Left Leg"] and cactus.Torso:FindFirstChild("Left Hip") then
- cactus.Torso:FindFirstChild("Left Hip"):Destroy()
- makejoint(cactus.Torso, LHC0, LHC1, cactus.Torso, cactus["Left Leg"], "Left Hip")
- cactus["Left Leg"]:FindFirstChild("touchy"):Destroy()
- end
- if cactus.Torso:findFirstChild("BodyPosition")~=nil then
- cactus.Torso.BodyPosition:remove()
- end
- if cactus.Torso:findFirstChild("BodyGyro")~=nil then
- cactus.Torso.BodyGyro:remove()
- end
- RS = cactus.Torso:FindFirstChild("Right Shoulder")
- LS = cactus.Torso:FindFirstChild("Left Shoulder")
- RH = cactus.Torso:FindFirstChild("Right Hip")
- LH = cactus.Torso:FindFirstChild("Left Hip")
- RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
- N = cactus.Torso:FindFirstChild("Neck")
- end
- function GunBlast(Pos)
- spawn(function()
- local P = Instance.new("Part",c)P.Transparency = 0 P.CanCollide = false P.Anchored = true P.CFrame = Pos P.Size = Vector3.new(1,1,1)
- P.BrickColor = BrickColor.new("Medium stone grey")P.Material = "Neon" local PM = Instance.new("SpecialMesh",P)PM.MeshType = "Sphere"PM.Scale = Vector3.new(0,0,0)
- for i = 1,10 do
- PM.Scale = PM.Scale + Vector3.new(2,2,2)
- P.Transparency = P.Transparency + 0.1
- swait()
- end
- P:remove()
- end)
- end
- mouse.Button1Down:connect(function()
- local P = Instance.new("Part",c)P.Transparency = 1 P.CanCollide = false P.Anchored = true P.CFrame = RightGun.CFrame*CFrame.new(0,0,1.5)
- local S = Instance.new("Sound",P)S.SoundId = "rbxassetid://158811113" S.Volume = 1 S:Play()
- GunBlast(RightGun.CFrame*CFrame.new(0,0,-1.5)) game.Debris:AddItem(P,2) RagBlast(c)
- end)
- idletime = 0
- sine = 0
- game:GetService("RunService").RenderStepped:connect(function()
- c.Humanoid.Health = c.Humanoid.Health + 1
- if Shot == false then
- local ToMouse = (mouse.hit.p - Head.Position).unit
- local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
- local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (c["RightArm"].Size.X / 2)), ((Head.Size.Y / 2) - (c["RightArm"].Size.Z / 2)), 0)))
- local ToMouseRightArm = ((mouse.hit.p - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
- local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
- local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
- if tostring(LateralAngle) == "-1.#IND" then
- LateralAngle = 0
- end
- local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
- if LateralAngle > (math.pi / 2) then
- LateralAngle = (math.pi / 2)
- end
- if Cross.Y < 0 then
- LateralAngle = -LateralAngle
- end
- RS.C0 = CFrame.new(RS.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), 0)
- RS.C0 = RS.C0*CFrame.Angles(0,0,math.rad(90))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement