SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | - | -- [ No Time To Explain! ] -- |
2 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | 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! ] -- | |
6 | -- [ Burst Gun ] -- | |
7 | wait() | |
8 | Music = true | |
9 | Player = game.Players.LocalPlayer | |
10 | c = game.Players.LocalPlayer.Character | |
11 | Head = c.Head | |
12 | anim = c.Humanoid.Animator | |
13 | Shot = false | |
14 | Battle = false | |
15 | p = game.Players.LocalPlayer | |
16 | Music = false | |
17 | PhaseEnabled = true | |
18 | TeleportEnabled = true | |
19 | ||
20 | local Effects = {} | |
21 | attack = false | |
22 | local attacking = false | |
23 | vt = Vector3.new | |
24 | bc = BrickColor.new | |
25 | br = BrickColor.random | |
26 | it = Instance.new | |
27 | cf = CFrame.new | |
28 | euler = CFrame.fromEulerAnglesXYZ | |
29 | angles = CFrame.Angles | |
30 | matr = math.random | |
31 | mouse = Player:GetMouse() | |
32 | ||
33 | c.Humanoid.WalkSpeed = 24 c.Humanoid.JumpPower = 50 | |
34 | RA = c["Right Arm"] | |
35 | RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
36 | RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
37 | LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
38 | LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
39 | RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
40 | RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
41 | LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
42 | LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
43 | NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
44 | NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
45 | RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
46 | RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
47 | RS = c.Torso:FindFirstChild("Right Shoulder") | |
48 | LS = c.Torso:FindFirstChild("Left Shoulder") | |
49 | RH = c.Torso:FindFirstChild("Right Hip") | |
50 | LH = c.Torso:FindFirstChild("Left Hip") | |
51 | RJ = c.HumanoidRootPart:FindFirstChild("RootJoint") | |
52 | N = c.Torso:FindFirstChild("Neck") | |
53 | cf = CFrame.new | |
54 | ang = CFrame.Angles | |
55 | rd = math.rad | |
56 | rd2 = math.random | |
57 | ||
58 | function swait(num) | |
59 | if num==0 or num==nil then | |
60 | game:service'RunService'.Heartbeat:wait(0) | |
61 | else | |
62 | for i=0,num do | |
63 | game:service'RunService'.Heartbeat:wait(0) | |
64 | end | |
65 | end | |
66 | end | |
67 | ||
68 | local Music = Instance.new("Sound",c.HumanoidRootPart)Music.SoundId = "rbxassetid://359311553" Music.Volume = 0.5 Music.Looped = true Music:Play() | |
69 | RS.Name = "RightShoulds" | |
70 | RA2 = RA:clone() RA2.Name = "RightArm" | |
71 | RA.Parent = nil | |
72 | RS.Parent = nil | |
73 | wait() | |
74 | RA2.Parent = c | |
75 | RS = Instance.new("Motor6D",c.Torso)RS.Part0 = c.Torso RS.Part1 = RA2 RS.C0 = RSC0 RS.C1 = RSC1 RS.Name = "Right Shoulder" | |
76 | RSM = Instance.new("SpecialMesh",RA2)RSM.MeshId = "rbxassetid://430080097" | |
77 | 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 | |
78 | local RightM = Instance.new("SpecialMesh",RightGun)RightM.MeshId = "rbxassetid://477037714" RightM.TextureId = "rbxassetid://477037796" RightM.Scale = Vector3.new(0.06,0.04,0.02) | |
79 | 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) | |
80 | 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) | |
81 | local HM = Instance.new("SpecialMesh",Hood)HM.MeshId = "rbxassetid://15393065" HM.Scale = Vector3.new(0.95,1,0.95) | |
82 | local HW = Instance.new("Weld",c.Head)HW.Part0 = c.Head HW.Part1 = Hood HW.C0 = CFrame.new(0,0.25,0) | |
83 | for _, c in pairs(c:children()) do | |
84 | if c.className == "Accessory" then | |
85 | c.Parent = nil | |
86 | end | |
87 | end | |
88 | c.Head.face:remove() | |
89 | local Rubble = Instance.new("Sound",c.HumanoidRootPart)Rubble.SoundId = "rbxassetid://172019967" Rubble.Volume = 0 Rubble.Looped = true | |
90 | ||
91 | function lerpz(joint, prop, cfrmz, alp) | |
92 | joint[prop] = joint[prop]:lerp(cfrmz, alp) | |
93 | end | |
94 | function resetlerp() | |
95 | RJ.C0 = RJC0 | |
96 | RJ.C1 = RJC1 | |
97 | N.C0 = NC0 | |
98 | N.C1 = NC1 | |
99 | RS.C0 = RSC0 | |
100 | RS.C1 = RSC1 | |
101 | LS.C0 = LSC0 | |
102 | LS.C1 = LSC1 | |
103 | RH.C0 = RHC0 | |
104 | RH.C1 = RHC1 | |
105 | LH.C0 = LHC0 | |
106 | LH.C1 = LHC1 | |
107 | end | |
108 | ||
109 | game:GetService('UserInputService').InputBegan:connect(function(InputObj) | |
110 | if InputObj.KeyCode == Enum.KeyCode.Slash then | |
111 | local finishEvent = nil | |
112 | isTyping = true | |
113 | finishEvent = game:GetService('UserInputService').InputBegan:connect(function(InputObj) | |
114 | if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then | |
115 | isTyping = false | |
116 | finishEvent:disconnect() | |
117 | end | |
118 | end) | |
119 | end | |
120 | end) | |
121 | ||
122 | Ded = false | |
123 | Deboun = false | |
124 | for i,v in pairs(c:children()) do | |
125 | if v.ClassName == "Part" then | |
126 | v.Touched:connect(function(Hit) | |
127 | if Hit.Parent ~= c and Hit.Name ~= "touchy" then | |
128 | 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 | |
129 | if v.Velocity.Y >= 50 or v.Velocity.Y <= -50 then | |
130 | if Hit.Parent:findFirstChild("Humanoid")== nil then | |
131 | local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://779129548" S.Volume = 3 S.PlaybackSpeed = 1 S:Play() | |
132 | v.Velocity = Vector3.new(10,10,10) | |
133 | for i = 1,4 do | |
134 | local Sizez = math.random(30,60)/10 | |
135 | 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) | |
136 | 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)) | |
137 | local BV = Instance.new("BodyVelocity",Partz)BV.maxForce = Vector3.new(math.huge,math.huge,math.huge) Partz.Name = "touchy" | |
138 | BV.velocity = Vector3.new(math.random(-90,90),5,math.random(-90,90))game.Debris:AddItem(BV,0.1) | |
139 | end | |
140 | Ded = true wait(4) Ded = false | |
141 | end | |
142 | else | |
143 | if Hit.Parent:findFirstChild("Humanoid")== nil and Deboun == false then Deboun = true | |
144 | local Sizez = math.random(30,60)/10 Rubble.Volume = 3 | |
145 | 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) | |
146 | 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) | |
147 | swait() Deboun = false | |
148 | end | |
149 | end | |
150 | 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 | |
151 | local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://179760759" S.Volume = 10 S.PlaybackSpeed = math.random(6,8)/10 S:Play() | |
152 | v.Velocity = Vector3.new(1,1,1) | |
153 | Ded = true wait(2) Ded = false | |
154 | end | |
155 | Rubble.Volume = 0 | |
156 | end | |
157 | end) | |
158 | ||
159 | end | |
160 | end | |
161 | 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 | |
162 | 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 | |
163 | 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 | |
164 | function RagBlast(cactus) | |
165 | cactus.Humanoid.PlatformStand = true Shot = true | |
166 | local BV = Instance.new("BodyVelocity",c.HumanoidRootPart)BV.Velocity = RightGun.CFrame.lookVector*-400 BV.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
167 | wait() BV:remove() | |
168 | if cactus["RightArm"]~=nil and cactus.Torso:FindFirstChild("Right Shoulder") then | |
169 | cactus.Torso:FindFirstChild("Right Shoulder"):Destroy() | |
170 | makegloo(cactus.Torso, RSC0, RSC1, cactus.Torso, cactus["RightArm"], "Right Shoulder") | |
171 | maketouchy(cactus["RightArm"], cactus["RightArm"], CFrame.new(0, 0.5, 0)) | |
172 | end | |
173 | if cactus["Left Arm"]~=nil and cactus.Torso:FindFirstChild("Left Shoulder") then | |
174 | cactus.Torso:FindFirstChild("Left Shoulder"):Destroy() | |
175 | makegloo(cactus.Torso, LSC0, LSC1, cactus.Torso, cactus["Left Arm"], "Left Shoulder") | |
176 | maketouchy(cactus["Left Arm"], cactus["Left Arm"], CFrame.new(0, 0.5, 0)) | |
177 | end | |
178 | if cactus["Right Leg"]~=nil and cactus.Torso:FindFirstChild("Right Hip") then | |
179 | cactus.Torso:FindFirstChild("Right Hip"):Destroy() | |
180 | makegloo(cactus.Torso, RHC0, RHC1, cactus.Torso, cactus["Right Leg"], "Right Hip") | |
181 | maketouchy(cactus["Right Leg"], cactus["Right Leg"], CFrame.new(0, 0.5, 0)) | |
182 | end | |
183 | if cactus["Left Leg"]~=nil and cactus.Torso:FindFirstChild("Left Hip") then | |
184 | cactus.Torso:FindFirstChild("Left Hip"):Destroy() | |
185 | makegloo(cactus.Torso, LHC0, LHC1, cactus.Torso, cactus["Left Leg"], "Left Hip") | |
186 | maketouchy(cactus["Left Leg"], cactus["Left Leg"], CFrame.new(0, 0.5, 0)) | |
187 | end | |
188 | local rag = true | |
189 | while rag == true do | |
190 | c.Humanoid.PlatformStand = true if Shot == false then break end | |
191 | if c.HumanoidRootPart.Velocity.Y < 0.5 and c.HumanoidRootPart.Velocity.Y > -0.5 | |
192 | and c.HumanoidRootPart.Velocity.X < 1 and c.HumanoidRootPart.Velocity.X > -1 | |
193 | and c.HumanoidRootPart.Velocity.Z < 1 and c.HumanoidRootPart.Velocity.Z > -1 | |
194 | and Ded == false then rag = false break end | |
195 | wait() | |
196 | end | |
197 | if c.Humanoid.PlatformStand == true then c.Humanoid.Jump = true c.Humanoid.PlatformStand = false end | |
198 | Shot = false | |
199 | if cactus["RightArm"] and cactus.Torso:FindFirstChild("Right Shoulder") then | |
200 | cactus.Torso:FindFirstChild("Right Shoulder"):Destroy() | |
201 | makejoint(cactus.Torso, RSC0, RSC1, cactus.Torso, cactus["RightArm"], "Right Shoulder") | |
202 | cactus["RightArm"]:FindFirstChild("touchy"):Destroy() | |
203 | end | |
204 | if cactus["Left Arm"] and cactus.Torso:FindFirstChild("Left Shoulder") then | |
205 | cactus.Torso:FindFirstChild("Left Shoulder"):Destroy() | |
206 | makejoint(cactus.Torso, LSC0, LSC1, cactus.Torso, cactus["Left Arm"], "Left Shoulder") | |
207 | cactus["Left Arm"]:FindFirstChild("touchy"):Destroy() | |
208 | end | |
209 | if cactus["Right Leg"] and cactus.Torso:FindFirstChild("Right Hip") then | |
210 | cactus.Torso:FindFirstChild("Right Hip"):Destroy() | |
211 | makejoint(cactus.Torso, RHC0, RHC1, cactus.Torso, cactus["Right Leg"], "Right Hip") | |
212 | cactus["Right Leg"]:FindFirstChild("touchy"):Destroy() | |
213 | end | |
214 | if cactus["Left Leg"] and cactus.Torso:FindFirstChild("Left Hip") then | |
215 | cactus.Torso:FindFirstChild("Left Hip"):Destroy() | |
216 | makejoint(cactus.Torso, LHC0, LHC1, cactus.Torso, cactus["Left Leg"], "Left Hip") | |
217 | cactus["Left Leg"]:FindFirstChild("touchy"):Destroy() | |
218 | end | |
219 | if cactus.Torso:findFirstChild("BodyPosition")~=nil then | |
220 | cactus.Torso.BodyPosition:remove() | |
221 | end | |
222 | if cactus.Torso:findFirstChild("BodyGyro")~=nil then | |
223 | cactus.Torso.BodyGyro:remove() | |
224 | end | |
225 | RS = cactus.Torso:FindFirstChild("Right Shoulder") | |
226 | LS = cactus.Torso:FindFirstChild("Left Shoulder") | |
227 | RH = cactus.Torso:FindFirstChild("Right Hip") | |
228 | LH = cactus.Torso:FindFirstChild("Left Hip") | |
229 | RJ = c.HumanoidRootPart:FindFirstChild("RootJoint") | |
230 | N = cactus.Torso:FindFirstChild("Neck") | |
231 | end | |
232 | ||
233 | function GunBlast(Pos) | |
234 | spawn(function() | |
235 | 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) | |
236 | 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) | |
237 | for i = 1,10 do | |
238 | PM.Scale = PM.Scale + Vector3.new(2,2,2) | |
239 | P.Transparency = P.Transparency + 0.1 | |
240 | swait() | |
241 | end | |
242 | P:remove() | |
243 | end) | |
244 | end | |
245 | ||
246 | mouse.Button1Down:connect(function() | |
247 | 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) | |
248 | local S = Instance.new("Sound",P)S.SoundId = "rbxassetid://158811113" S.Volume = 1 S:Play() | |
249 | GunBlast(RightGun.CFrame*CFrame.new(0,0,-1.5)) game.Debris:AddItem(P,2) RagBlast(c) | |
250 | end) | |
251 | ||
252 | idletime = 0 | |
253 | sine = 0 | |
254 | game:GetService("RunService").RenderStepped:connect(function() | |
255 | c.Humanoid.Health = c.Humanoid.Health + 1 | |
256 | if Shot == false then | |
257 | local ToMouse = (mouse.hit.p - Head.Position).unit | |
258 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
259 | 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))) | |
260 | local ToMouseRightArm = ((mouse.hit.p - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
261 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
262 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
263 | if tostring(LateralAngle) == "-1.#IND" then | |
264 | LateralAngle = 0 | |
265 | end | |
266 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
267 | if LateralAngle > (math.pi / 2) then | |
268 | LateralAngle = (math.pi / 2) | |
269 | end | |
270 | if Cross.Y < 0 then | |
271 | LateralAngle = -LateralAngle | |
272 | end | |
273 | RS.C0 = CFrame.new(RS.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), 0) | |
274 | RS.C0 = RS.C0*CFrame.Angles(0,0,math.rad(90)) | |
275 | end | |
276 | end) |