SHOW:
|
|
- or go back to the newest paste.
1 | - | lp=game.Players.LocalPlayer |
1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
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,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end lp=game.Players.LocalPlayer | |
6 | chr=lp.Character | |
7 | attacking=false | |
8 | stealth=false | |
9 | nova=false | |
10 | vanish=false | |
11 | mouse = game.Players.LocalPlayer:GetMouse() | |
12 | Weld = function(p0,p1,x,y,z,rx,ry,rz,par) | |
13 | p0.Position = p1.Position | |
14 | local w = Instance.new('Motor',par or p0) | |
15 | w.Part0 = p0 | |
16 | w.Part1 = p1 | |
17 | w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz) | |
18 | return w | |
19 | end | |
20 | function Chat(Object,Text,Color) | |
21 | local Color = BrickColor.new(Color) | |
22 | pcall(function()Object:findFirstChild("AtlasText"):Destroy()end) | |
23 | local G = Instance.new("BillboardGui",Object) | |
24 | G.Name = "AtlasText" | |
25 | G.Adornee = Object | |
26 | G.Size = UDim2.new(3.5,0,2.5,0) | |
27 | G.AlwaysOnTop = false | |
28 | G.StudsOffset = Vector3.new(0,3,0) | |
29 | local Frame = Instance.new("Frame") | |
30 | Frame.Parent = G | |
31 | Frame.Size = UDim2.new(1,0,1,0) | |
32 | Frame.BackgroundTransparency = 1 | |
33 | local Txt = Instance.new("TextLabel",Frame) | |
34 | Txt.Size = UDim2.new(1,0,1,0) | |
35 | Txt.Text = Text | |
36 | Txt.TextScaled = true | |
37 | Txt.TextWrapped = true | |
38 | Txt.Font = "SourceSansBold" | |
39 | Txt.TextColor = Color | |
40 | Txt.BackgroundTransparency = 1 | |
41 | Txt.ZIndex = 2 | |
42 | Game:GetService("Debris"):AddItem(G,3) | |
43 | end | |
44 | galacta=Instance.new("Model",chr) | |
45 | galacta.Name="Galacta" | |
46 | hilt=Instance.new("Part",chr.Galacta) | |
47 | hilt.FormFactor="Custom" | |
48 | hilt.Size=Vector3.new(0.2,0.2,0.2) | |
49 | hilt.CanCollide=false | |
50 | hilt.BrickColor=BrickColor.new("White") | |
51 | hiltmesh=Instance.new("CylinderMesh",hilt) | |
52 | hiltmesh.Scale=Vector3.new(2.5,10,2.5) | |
53 | Weld(hilt,chr['Right Arm'],0,-1,0,4.7,5,0,hilt) | |
54 | ring=Instance.new("Part",chr.Galacta) | |
55 | ring.FormFactor="Custom" | |
56 | ring.Size=Vector3.new(0.2,0.2,0.2) | |
57 | ring.CanCollide=false | |
58 | ring.BrickColor=BrickColor.new("Navy blue") | |
59 | ringmesh=Instance.new("SpecialMesh",ring) | |
60 | ringmesh.MeshId="rbxassetid://3270017" | |
61 | ringmesh.Scale=Vector3.new(1,1,1) | |
62 | Weld(ring,hilt,0,0.9,0,4.7,0,0,ring) | |
63 | - | spike.BrickColor=BrickColor.new("Hot pink") |
63 | + | |
64 | spike.FormFactor="Custom" | |
65 | spike.Size=Vector3.new(0.2,0.2,0.2) | |
66 | spike.CanCollide=false | |
67 | spike.BrickColor=BrickColor.new("Purple") | |
68 | spikemesh=Instance.new("SpecialMesh",spike) | |
69 | spikemesh.MeshId="rbxassetid://1033714" | |
70 | spikemesh.Scale=Vector3.new(0.5,5,0.5) | |
71 | Weld(spike,hilt,0,2.7,0,0,4.7,0,spike) | |
72 | ||
73 | ||
74 | mouse.KeyDown:connect(function(key) | |
75 | key:lower() | |
76 | if key == "e" and attacking == false then | |
77 | attacking=true | |
78 | chr.Humanoid.MaxHealth=math.huge | |
79 | attacking=false | |
80 | end | |
81 | end) | |
82 | mouse.KeyDown:connect(function(key) | |
83 | key:lower() | |
84 | if key =="q" and attacking == false then | |
85 | attacking = true | |
86 | chr.Humanoid.MaxHealth=100 | |
87 | attacking=false | |
88 | end | |
89 | end) | |
90 | mouse.KeyDown:connect(function(key) | |
91 | key:lower() | |
92 | if key == "b" and attacking == false then | |
93 | attacking = true | |
94 | Instance.new("ForceField",chr) | |
95 | z=Instance.new("Explosion",chr) | |
96 | z.Position = chr.Torso.Position | |
97 | wait(5) | |
98 | attacking = false | |
99 | chr.ForceField:Destroy() | |
100 | end | |
101 | end) | |
102 | mouse.KeyDown:connect(function(key) | |
103 | key:lower() | |
104 | if key == "h" and attacking == false then | |
105 | chr.Humanoid.Health=chr.Humanoid.MaxHealth | |
106 | end | |
107 | end) | |
108 | mouse.KeyDown:connect(function(key) | |
109 | key:lower() | |
110 | if key == "z" and attacking == false then | |
111 | attacking = true | |
112 | x=Instance.new("Part",chr) | |
113 | x.Size=Vector3.new(5,5,5) | |
114 | x.CanCollide=false | |
115 | x.Transparency=1 | |
116 | Weld(x,chr.Torso,0,0,0,0,0,0,x) | |
117 | x.Touched:connect(function(hit) | |
118 | if hit.Parent:FindFirstChild("Humanoid") then | |
119 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(25) | |
120 | end | |
121 | end) | |
122 | wait(5) | |
123 | x:Destroy() | |
124 | attacking = false | |
125 | end | |
126 | end) | |
127 | mouse.KeyDown:connect(function(key) | |
128 | key:lower() | |
129 | if key == "x" and stealth == false then | |
130 | stealth=true | |
131 | for i,v in pairs(chr:GetChildren()) do | |
132 | if v:IsA("Hat") then | |
133 | v.Handle.Transparency=1 | |
134 | end | |
135 | end | |
136 | for i,v in pairs(chr:GetChildren()) do | |
137 | if v:IsA("Part") then | |
138 | v.Transparency=1 | |
139 | end | |
140 | end | |
141 | for i,v in pairs(chr.Galacta:GetChildren()) do | |
142 | if v:IsA("Part") then | |
143 | v.Transparency=1 | |
144 | end | |
145 | end | |
146 | chr.Head.face.Texture="0" | |
147 | end | |
148 | end) | |
149 | mouse.KeyDown:connect(function(key) | |
150 | key:lower() | |
151 | if key == "c" and stealth == true then | |
152 | for i,v in pairs(chr:GetChildren()) do | |
153 | if v:IsA("Hat") then | |
154 | v.Handle.Transparency=0 | |
155 | end | |
156 | end | |
157 | for i,v in pairs(chr:GetChildren()) do | |
158 | if v:IsA("Part") then | |
159 | v.Transparency=0 | |
160 | end | |
161 | end | |
162 | chr.HumanoidRootPart.Transparency=1 | |
163 | for i,v in pairs(chr.Galacta:GetChildren()) do | |
164 | if v:IsA("Part") then | |
165 | v.Transparency=0 | |
166 | end | |
167 | end | |
168 | chr.Head.face.Texture="rbxassetid://7317691" | |
169 | stealth=false | |
170 | end | |
171 | end) | |
172 | mouse.KeyDown:connect(function(key) | |
173 | key:lower() | |
174 | if key == "v" and attacking == false then | |
175 | for i,v in pairs(Workspace:GetChildren()) do | |
176 | if v:IsA("Model") then | |
177 | v:BreakJoints() | |
178 | end | |
179 | end | |
180 | end | |
181 | end) | |
182 | mouse.KeyDown:connect(function(key) | |
183 | key:lower() | |
184 | if key == "r" and attacking == false then | |
185 | for i = 1,100 do | |
186 | e=Instance.new("Explosion",chr) | |
187 | e.Position = mouse.Hit.p | |
188 | end | |
189 | end | |
190 | end) | |
191 | mouse.KeyDown:connect(function(key) | |
192 | key:lower() | |
193 | if key =="f" and nova == false and attacking == false and vanish == false then | |
194 | vanish=true | |
195 | nova=true | |
196 | attacking=true | |
197 | stealth=true | |
198 | for i,v in pairs(chr.Galacta:GetChildren()) do | |
199 | if v:IsA("Part") then | |
200 | v.Transparency=1 | |
201 | end | |
202 | end | |
203 | Chat(chr.Head,"DISSAPEAR!","Hot pink") | |
204 | end | |
205 | end) | |
206 | mouse.KeyDown:connect(function(key) | |
207 | key:lower() | |
208 | if key =="g" and nova == true and stealth == true and vanish == true and attacking == true then | |
209 | vanish=false | |
210 | stealth=false | |
211 | attacking=false | |
212 | nova=false | |
213 | for i,v in pairs(chr.Galacta:GetChildren()) do | |
214 | if v:IsA("Part") then | |
215 | v.Transparency=0 | |
216 | end | |
217 | end | |
218 | Chat(chr.Head,"REAPPEAR!","Hot pink") | |
219 | end | |
220 | end) |