SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has been converted to FE by iPxter | |
2 | ||
3 | ||
4 | - | local player=game.Players.LocalPlayer |
4 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | script.Parent = Player.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent and t.Function then | |
34 | t.Function(...) | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=Player then return end | |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | else | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local Mouse = Player:GetMouse() | |
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
85 | end | |
86 | ||
87 | --==Made by LuisPambid==-- | |
88 | ||
89 | ||
90 | local player=owner | |
91 | local char=player.Character | |
92 | repeat wait() until player and char | |
93 | local torso=char.Torso | |
94 | local head=char.Head | |
95 | local human=char.Humanoid | |
96 | local arm={Left=char["Left Arm"], Right=char["Right Arm"]} | |
97 | local leg={Left=char["Left Leg"], Right=char["Right Leg"]} | |
98 | local c=function(f) coroutine.resume(coroutine.create(f)) end | |
99 | local p=function(f) pcall(f) end | |
100 | local add = { | |
101 | Part=function(par, a, c, col, t, s, cf, ms) | |
102 | local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end) | |
103 | local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end) | |
104 | return p | |
105 | end, | |
106 | Wedge=function(par, a, c, col, t, s, cf, ms) | |
107 | local p=Instance.new("WedgePart", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new() end) | |
108 | local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end) | |
109 | return p | |
110 | end, | |
111 | Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos) | |
112 | local g=Instance.new(ins, par) pcall(function() g.BorderColor=BridckColor.new(bc) g.BackgroundColor=BrickColor.new(bg) g.TextColor=BrickColor.new(tc) g.FontSize=fs g.Font="ArialBold" g.Text=text g.Transparency=t g.Size=s g.Position=pos end) | |
113 | return g | |
114 | end, | |
115 | Weld=function(par, p1, cf) | |
116 | local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new() end) | |
117 | return w | |
118 | end, | |
119 | Mesh=function(ins, par, s, of, t) | |
120 | local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new() m.Offset=of or Vector3.new() m.MeshType=t end) | |
121 | return m | |
122 | end, | |
123 | Sound=function(parent, id, volume, pitch) | |
124 | local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume s.Pitch=pitch end) | |
125 | return s | |
126 | end, | |
127 | } | |
128 | local scriptname="Spy" --Name here | |
129 | pcall(function() player.Backpack[scriptname]:remove() char[scriptname]:remove() char["Objects"]:remove() player.PlayerGui[scriptname]:remove() end) | |
130 | local model=Instance.new("Model", char) model.Name="Objects" | |
131 | local modelB=Instance.new("Model", char) modelB.Name=scriptname | |
132 | local gui=Instance.new("ScreenGui", player.PlayerGui) gui.Name=scriptname | |
133 | local bin=Instance.new("HopperBin", player.Backpack) bin.Name=scriptname | |
134 | local skincolor="Really black" | |
135 | local body={} | |
136 | local animate={} | |
137 | local obj={} | |
138 | function createParts() | |
139 | --==PARTS==-- | |
140 | body.Torso=add.Part(model, false, false, skincolor, 1, Vector3.new(2, 2, 1), nil) | |
141 | body.ArmLeft, body.ArmRight=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil) | |
142 | body.LegLeft, body.LegRight=add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil) | |
143 | --==WELDS==-- | |
144 | body.TorsoW=add.Weld(body.Torso, torso, nil) | |
145 | body.ArmLeftW, body.ArmRightW=add.Weld(body.ArmLeft, body.Torso, CFrame.new(-1.5, .5, 0)), add.Weld(body.ArmRight, body.Torso, CFrame.new(1.5, .5, 0)) | |
146 | body.LegLeftW, body.LegRightW=add.Weld(body.LegLeft, body.Torso, CFrame.new(-.5, -1.5, 0)), add.Weld(body.LegRight, body.Torso, CFrame.new(.5, -1.5, 0)) | |
147 | --==MESHES==-- | |
148 | add.Weld(arm.Left, body.ArmLeft, CFrame.new(0, -.5, 0)) | |
149 | add.Weld(arm.Right, body.ArmRight, CFrame.new(0, -.5, 0)) | |
150 | torso["Left Hip"].Part0=body.Torso | |
151 | torso["Right Hip"].Part0=body.Torso | |
152 | --------------------------------------------------------------------------------------- | |
153 | animate={ | |
154 | ["Torso"]=function(cf) body.Torso.Transparency=0 torso.Transparency=1 | |
155 | body.TorsoW.C1=cf | |
156 | end; | |
157 | ["ArmLeft"]=function(cf) | |
158 | body.ArmLeftW.C1=CFrame.new(-1.5, .5, 0)*cf | |
159 | end; | |
160 | ["ArmRight"]=function(cf) | |
161 | body.ArmRightW.C1=CFrame.new(1.5, .5, 0)*cf | |
162 | end; | |
163 | ["LegLeft"]=function(cf) | |
164 | body.LegLeftW.C1=CFrame.new(-.5, -1.5, 0)*cf | |
165 | end; | |
166 | ["LegRight"]=function(cf) | |
167 | body.LegRightW.C1=CFrame.new(.5, -1.5, 0)*cf | |
168 | end; | |
169 | } | |
170 | --==Objects==-- | |
171 | obj.HandleBack=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, 1, .2), nil) | |
172 | obj.HandleBackW=add.Weld(obj.HandleBack, body.ArmRight, CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, 0)) | |
173 | obj.EdgeBot=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
174 | obj.EdgeBotM=add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil) | |
175 | obj.EdgeBotW=add.Weld(obj.EdgeBot, obj.HandleBack, CFrame.new(0, -.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
176 | obj.EdgeTopR=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
177 | obj.EdgeTopRM=add.Mesh("CylinderMesh", obj.EdgeTopR, Vector3.new(1, 1, 1), nil, nil) | |
178 | obj.EdgeTopRW=add.Weld(obj.EdgeTopR, obj.HandleBack, CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
179 | ||
180 | obj.Blade=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .8, .2), nil) | |
181 | obj.BladeM=add.Mesh("BlockMesh", obj.Blade, Vector3.new(.5, 1, 1), nil, nil) | |
182 | obj.BladeW=add.Weld(obj.Blade, obj.EdgeTopR, CFrame.new(-.1, 0, -.4)*CFrame.Angles(-math.rad(90), math.rad(90), 0)) | |
183 | obj.Point=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .4, .2), nil) | |
184 | obj.PointM=add.Mesh("SpecialMesh", obj.Point, Vector3.new(.5, 1, .5), nil, "Wedge") | |
185 | obj.PointW=add.Weld(obj.Point, obj.Blade, CFrame.new(0, .6, .05)*CFrame.Angles(0, math.rad(180), 0)) | |
186 | obj.Point2=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .4, .2), nil) | |
187 | obj.Point2M=add.Mesh("SpecialMesh", obj.Point2, Vector3.new(.5, 1, .5), nil, "Wedge") | |
188 | obj.Point2W=add.Weld(obj.Point2, obj.Blade, CFrame.new(0, .6, -.05)) | |
189 | ||
190 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
191 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
192 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeBot, nil) | |
193 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
194 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
195 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeTopR, nil) | |
196 | ||
197 | obj.EdgeTopR2=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
198 | obj.EdgeTopR2M=add.Mesh("CylinderMesh", obj.EdgeTopR2, Vector3.new(1, 1, 1), nil, nil) | |
199 | obj.EdgeTopR2W=add.Weld(obj.EdgeTopR2, obj.Blade, CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
200 | obj.HandleFor=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, 1, .2), nil) | |
201 | obj.HandleForW=add.Weld(obj.HandleFor, obj.EdgeTopR2, CFrame.new(0, 0, .5)*CFrame.Angles(-math.rad(90), -math.rad(90), 0)) | |
202 | obj.EdgeBot=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
203 | obj.EdgeBotM=add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil) | |
204 | obj.EdgeBotW=add.Weld(obj.EdgeBot, obj.HandleFor, CFrame.new(0, -.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
205 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
206 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
207 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeBot, nil) | |
208 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
209 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
210 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeTopR2, nil) | |
211 | end | |
212 | function removeParts() | |
213 | p(function() | |
214 | if torso then | |
215 | torso["Left Hip"].Part0=torso | |
216 | torso["Right Hip"].Part0=torso | |
217 | end | |
218 | for i, v in pairs(model:children()) do v:remove() end for i, v in pairs(modelB:children()) do v:remove() end for i, v in pairs(char:children()) do v.Transparency=0 end | |
219 | end) | |
220 | end | |
221 | --Variables-- | |
222 | local trailDeb=false | |
223 | local using=false | |
224 | local combo=1 | |
225 | local onStab=false | |
226 | local keyDeb=false | |
227 | local switch=false | |
228 | local switch2=false | |
229 | local keyDeb2=false | |
230 | local hitDeb=false | |
231 | local dmg=math.random(5, 10) | |
232 | local speed=20 | |
233 | local pitch=.8 | |
234 | local Slash=add.Sound(torso, "rbxasset://sounds//swordslash.wav", 2, pitch) | |
235 | local Hit=add.Sound(torso, "http://www.roblox.com/asset/?id=30715280", 2, 2) | |
236 | local Abscond=add.Sound(torso, "http://www.roblox.com/asset/?id=2767090", 2, 2) | |
237 | local Equip=add.Sound(torso, "http://www.roblox.com/asset/?id=13510737", 2, 2) | |
238 | local attackLabel=add.Gui("TextLabel", gui, "Gold", "Gold", "Gold", "Size18", "Invisible(Q)", 0, UDim2.new(0, 150, 0, 50), UDim2.new(0, 0, 0, 150)) | |
239 | local attackLabel2=add.Gui("TextLabel", attackLabel, "Gold", "Gold", "Gold", "Size18", "Disguise(E)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0)) | |
240 | ||
241 | function lightningGen(startPos, endPos) | |
242 | local magnitude=(startPos-endPos).magnitude | |
243 | local distance=(startPos+endPos)/2 | |
244 | local pattern=add.Part(workspace, true, false, "Gold", 1, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPos)) | |
245 | local startPosProx=startPos | |
246 | for i=1, 9 do | |
247 | local startPosProx2=startPosProx | |
248 | local random=Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)) | |
249 | local findSize=pattern.Size.z/10 | |
250 | local findOffSet=pattern.CFrame.lookVector*-1 | |
251 | local compute=i*findSize*findOffSet | |
252 | local newStartPos=startPos | |
253 | local newEndPos=CFrame.new(random+compute+newStartPos).p | |
254 | local magnitude=(startPosProx2-newEndPos).magnitude | |
255 | local distance=(startPosProx2+newEndPos)/2 | |
256 | local lightning=add.Part(workspace, true, false, "Bright yellow", 0, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPosProx2)) | |
257 | c(function() | |
258 | for i=0, 1, .1 do wait() | |
259 | lightning.Transparency=i | |
260 | end | |
261 | lightning:remove() | |
262 | end) | |
263 | startPosProx=newEndPos | |
264 | end | |
265 | pattern:remove() | |
266 | end | |
267 | function computePos(pos, pos2) | |
268 | local pos3=Vector3.new(pos2.x, pos.y, pos2.z) | |
269 | torso.CFrame=CFrame.new(pos, pos3) | |
270 | return pos3 | |
271 | end | |
272 | function nearTorso(pos, dis) | |
273 | local temp | |
274 | local distance=dis | |
275 | for i, v in pairs(workspace:children()) do | |
276 | if v:isA("Model") then | |
277 | temp=v:findFirstChild("Torso") | |
278 | local humanoid=v:findFirstChild("Humanoid") | |
279 | if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then | |
280 | distance=(temp.CFrame.p-pos).magnitude | |
281 | return temp | |
282 | end | |
283 | end | |
284 | end | |
285 | end | |
286 | function trail(pos, cf, col) | |
287 | c(function() | |
288 | local old=(pos.CFrame*cf).p | |
289 | while trailDeb==true do | |
290 | wait() | |
291 | local new=(pos.CFrame*cf).p | |
292 | local mag=(old-new).magnitude | |
293 | local dis=(old+new)/2 | |
294 | local trail=add.Part(workspace, true, false, col, 0, Vector3.new(.2, mag, .2), CFrame.new(dis, new)*CFrame.Angles(math.pi/2, 0, 0)) trail.Name="Trail" | |
295 | local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(.5, 1, .5), nil, nil) | |
296 | old=new | |
297 | c(function() | |
298 | for i=1, 0, -.1 do | |
299 | wait() | |
300 | tMesh.Scale=tMesh.Scale*Vector3.new(i, 1, i) | |
301 | end | |
302 | trail:remove() | |
303 | end) | |
304 | c(function() | |
305 | for i=0, 1, .1 do | |
306 | wait() | |
307 | trail.Transparency=i | |
308 | end | |
309 | end) | |
310 | end | |
311 | end) | |
312 | end | |
313 | ||
314 | function running() | |
315 | animate.ArmLeft(CFrame.Angles(-math.rad(45), 0, -math.rad(15))) | |
316 | animate.ArmRight(CFrame.Angles(math.rad(45), 0, math.rad(15))) | |
317 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, 0) | |
318 | end | |
319 | ||
320 | function hit(h) | |
321 | if using==true then | |
322 | if switch==false then | |
323 | if onStab==false and h.Parent:findFirstChild("Humanoid") and h.Parent~=char and hitDeb==false then hitDeb=true print("ErrorUnNamed") Hit:play() | |
324 | local hHuman=h.Parent:findFirstChild("Humanoid") | |
325 | hHuman.Health=hHuman.Health-dmg | |
326 | local fakeM=Instance.new("Model", workspace) fakeM.Name=-dmg | |
327 | local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0 | |
328 | local effect=add.Part(fakeM, false, false, "Gold", 0, Vector3.new(1, 1, 1), h.CFrame) effect.Name="Head" | |
329 | local fakeMesh=add.Mesh("CylinderMesh", effect, Vector3.new(1, .5, 1), nil, nil) | |
330 | local bp=Instance.new("BodyPosition", effect) bp.maxForce=Vector3.new(math.huge, math.huge, math.huge) bp.position=h.Position+Vector3.new(0, 4, 0) | |
331 | game.Debris:addItem(fakeM, 2) | |
332 | wait(1) | |
333 | hitDeb=false | |
334 | end | |
335 | if onStab==true and h.Parent~=char and h.Parent:findFirstChild("Humanoid") and hitDeb==false then hitDeb=true print("Error") Hit:play() | |
336 | h.Parent:breakJoints() | |
337 | local fakeM=Instance.new("Model", workspace) fakeM.Name="Tr1st4bb3d" | |
338 | local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0 | |
339 | local effect=add.Part(fakeM, false, false, "Bright red", 0, Vector3.new(1, 1, 1), h.CFrame) effect.Name="Head" | |
340 | local fakeMesh=add.Mesh("CylinderMesh", effect, Vector3.new(1, .5, 1), nil, nil) | |
341 | local bp=Instance.new("BodyPosition", effect) bp.maxForce=Vector3.new(math.huge, math.huge, math.huge) bp.position=h.Position+Vector3.new(0, 4, 0) | |
342 | game.Debris:addItem(fakeM, 2) | |
343 | wait(1) | |
344 | hitDeb=false | |
345 | end | |
346 | end | |
347 | end | |
348 | end | |
349 | ||
350 | function findStab() | |
351 | while using==false do wait() | |
352 | --pcall(function() | |
353 | local nTorso=nearTorso(torso.CFrame.p, 3) | |
354 | if nTorso then | |
355 | local offSet=nTorso.CFrame:toObjectSpace(torso.CFrame) | |
356 | if offSet.z>0 then | |
357 | onStab=true | |
358 | animate.ArmRight(CFrame.Angles(math.rad(135), 0, 0)) | |
359 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(math.rad(90), 0, 0) | |
360 | else | |
361 | onStab=false | |
362 | running() | |
363 | end | |
364 | else | |
365 | onStab=false | |
366 | running() | |
367 | end | |
368 | --end) | |
369 | end | |
370 | end | |
371 | ||
372 | function attack() combo=combo+1 | |
373 | if using==false then using=true for i, v in pairs(modelB:children()) do v.Touched:connect(hit) end | |
374 | if combo==1 and onStab==false then Slash:play() | |
375 | --[[trailDeb=true | |
376 | trail(obj.Blade, CFrame.new(0, 1, 0), "Gold")]] | |
377 | for i=0, 1, .2 do wait() | |
378 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
379 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, 0)) | |
380 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, math.rad(45)*i) | |
381 | end | |
382 | for i=1, 0, -.2 do wait() | |
383 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
384 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, 0)) | |
385 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, math.rad(45)*i) | |
386 | end | |
387 | if combo>1 and onStab==false then combo=2 Slash:play() | |
388 | for i=0, 1, .2 do wait() | |
389 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
390 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, math.rad(45)*i)) | |
391 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90+(90*i)), 0, 0) | |
392 | end | |
393 | for i=1, 0, -.2 do wait() | |
394 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
395 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, math.rad(45)*i)) | |
396 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90+(90*i)), 0, 0) | |
397 | end | |
398 | end | |
399 | end | |
400 | if onStab==true then | |
401 | for i=0, 1, .2 do wait() | |
402 | animate.ArmRight(CFrame.Angles(math.rad(135-(45*i)), 0, 0)) | |
403 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(math.rad(90), 0, 0) | |
404 | end | |
405 | onStab=false | |
406 | end | |
407 | using=false | |
408 | --trailDeb=false | |
409 | combo=0 | |
410 | body.Torso.Transparency=1 torso.Transparency=0 | |
411 | running() | |
412 | findStab() | |
413 | end | |
414 | end | |
415 | ||
416 | bin.Selected:connect(function(mouse) createParts() | |
417 | human.WalkSpeed=speed | |
418 | running() | |
419 | using=true | |
420 | Equip:play() | |
421 | for i=1, 0, -.1 do wait() | |
422 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), math.rad(180)*i, 0) | |
423 | obj.EdgeTopRW.C1=CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
424 | obj.EdgeTopR2W.C1=CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
425 | end | |
426 | using=false | |
427 | mouse.Button1Down:connect(attack) | |
428 | mouse.KeyDown:connect(function(key) | |
429 | local key=key:lower() | |
430 | --INVISBLE-- | |
431 | if key=="q" and keyDeb==false and switch==false and using==false then keyDeb=true switch=true using=true | |
432 | attackLabel.Text="Visible(Q)" print("1") Abscond:play() | |
433 | pcall(function() char.Sound.Disabled=true end) | |
434 | for i, v in pairs(char:children()) do | |
435 | c(function() | |
436 | for i=0, 1, .2 do wait() | |
437 | pcall(function() | |
438 | c(function() if v.Head~=nil then head.Transparency=1 end end) | |
439 | v.Transparency=i | |
440 | end) | |
441 | pcall(function() v.Handle.Transparency=i end) | |
442 | pcall(function() v.face.Transparency=i end) | |
443 | pcall(function() v.roblox.Transparency=i end) | |
444 | pcall(function() v.Head.Transparency=i end) | |
445 | end | |
446 | end) | |
447 | end | |
448 | for i, v in pairs(modelB:children()) do | |
449 | c(function() | |
450 | for i=0, 1, .2 do wait() | |
451 | pcall(function() | |
452 | v.Transparency=i | |
453 | end) | |
454 | pcall(function() v.Handle.Transparency=i end) | |
455 | pcall(function() v.face.Transparency=i end) | |
456 | end | |
457 | end) | |
458 | end | |
459 | wait(.5) | |
460 | local fakeModel=Instance.new("Model", workspace.CurrentCamera) fakeModel.Name="Spy" | |
461 | local fakeHumanoid=Instance.new("Humanoid", fakeModel) fakeHumanoid.Health=0 fakeHumanoid.MaxHealth=0 | |
462 | local fakeHead=add.Part(fakeModel, false, false, "Really black", 0, Vector3.new(1, 1, 1), nil) fakeHead.Name="Head" | |
463 | local fakeHeadM=add.Mesh("SpecialMesh", fakeHead, Vector3.new(1, 1.5, 1), nil, "File") | |
464 | fakeHeadM.MeshId="http://www.roblox.com/Asset/?id=9756362" | |
465 | local fakeHeadW=add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0)) | |
466 | modelB.Parent=workspace.CurrentCamera | |
467 | for i, v in pairs(modelB:children()) do | |
468 | c(function() | |
469 | for i=0, 1, .2 do wait() | |
470 | pcall(function() | |
471 | v.Transparency=.5 | |
472 | end) | |
473 | pcall(function() v.Handle.Transparency=.5 end) | |
474 | pcall(function() v.face.Transparency=.5 end) | |
475 | end | |
476 | end) | |
477 | end | |
478 | keyDeb=false | |
479 | elseif key=="q" and keyDeb==false and switch==true and using==true then keyDeb=true switch=false using=false | |
480 | attackLabel.Text="Invisible(Q)" print("2") Abscond:play() | |
481 | pcall(function() char.Sound.Disabled=false end) | |
482 | modelB.Parent=char | |
483 | for i, v in pairs(char:children()) do | |
484 | c(function() | |
485 | for i=1, 0, -.2 do wait() | |
486 | pcall(function() | |
487 | c(function() if v.Head~=nil then head.Transparency=1 end end) | |
488 | v.Transparency=i | |
489 | end) | |
490 | pcall(function() v.Handle.Transparency=i end) | |
491 | pcall(function() v.face.Transparency=i end) | |
492 | pcall(function() v.roblox.Transparency=i end) | |
493 | pcall(function() v.Head.Transparency=i end) | |
494 | end | |
495 | end) | |
496 | end | |
497 | for i, v in pairs(modelB:children()) do | |
498 | c(function() | |
499 | for i=1, 0, -.2 do wait() | |
500 | pcall(function() | |
501 | v.Transparency=i | |
502 | end) | |
503 | pcall(function() v.Handle.Transparency=i end) | |
504 | pcall(function() v.face.Transparency=i end) | |
505 | end | |
506 | end) | |
507 | end | |
508 | for i, v in pairs(workspace.CurrentCamera:children()) do pcall(function() v:remove() end) end | |
509 | wait(.5) | |
510 | keyDeb=false | |
511 | findStab() | |
512 | end | |
513 | --DISGUISE MENU-- | |
514 | local xSpace=0 | |
515 | if key=="e" and keyDeb2==false and switch2==false then keyDeb2=true switch2=true | |
516 | attackLabel2.Text="Menu:" | |
517 | for i, v in pairs(game.Players:children()) do | |
518 | if v~=player then xSpace=xSpace+1 | |
519 | local playersLabel=add.Gui("TextButton", attackLabel2, "Gold", "Gold", "Gold", "Size18", v.Name, 0, UDim2.new(1, 0, 1, 0), UDim2.new(xSpace, 0, 0, 0)) | |
520 | playersLabel.MouseButton1Click:connect(function() Abscond:play() | |
521 | pcall(function() | |
522 | for i, v in pairs(char:children()) do | |
523 | pcall(function() v.face:remove() end) | |
524 | pcall(function() v.roblox:remove() end) | |
525 | pcall(function() v.Head:remove() end) | |
526 | if v:IsA("BodyColors") then v:remove() end | |
527 | if v:IsA("Hat") then v:remove() end | |
528 | if v:IsA("ShirtGraphic") then v:remove() end | |
529 | if v:IsA("Pants") then v:remove() end | |
530 | if v:IsA("Shirt") then v:remove() end | |
531 | if v:IsA("CharacterMesh") then v:remove() end | |
532 | if v:IsA("BodyColors") then v:remove() end | |
533 | end | |
534 | for i, v in pairs(game.Players[playersLabel.Text].Character:children()) do | |
535 | pcall(function() local cloned=v.face:clone() cloned.Parent=head if switch==true then pcall(function() cloned.Transparency=1 end) end end) | |
536 | pcall(function() v.roblox:clone().Parent=torso end) | |
537 | if v:IsA("BodyColors") then v:clone().Parent=char end | |
538 | if v:IsA("Hat") then local cloned=v:clone() cloned.Parent=char if switch==true then pcall(function() cloned.Handle.Transparency=1 end) end end | |
539 | if v:IsA("ShirtGraphic") then v:clone().Parent=char end | |
540 | if v:IsA("Pants") then v:clone().Parent=char end | |
541 | if v:IsA("Shirt") then v:clone().Parent=char end | |
542 | if v:IsA("CharacterMesh") then v:clone().Parent=char end | |
543 | if v:IsA("BodyColors") then v:clone().Parent=char end | |
544 | end | |
545 | head.Transparency=1 | |
546 | local fakeModel=Instance.new("Model", char) fakeModel.Name=playersLabel.Text | |
547 | local fakeHumanoid=Instance.new("Humanoid", fakeModel) fakeHumanoid.Health=125 fakeHumanoid.MaxHealth=125 | |
548 | local fakeHead=add.Part(fakeModel, false, false, game.Players[playersLabel.Text].Character.Head.Color, 0, Vector3.new(1, 1, 1), nil) fakeHead.Name="Head" | |
549 | if switch==true then fakeHead.Transparency=1 end | |
550 | local fakeHeadM=add.Mesh("SpecialMesh", fakeHead, Vector3.new(1.25, 1.25, 1.25), nil, "Head") | |
551 | local fakeHeadW=add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0)) | |
552 | end) | |
553 | end) | |
554 | end | |
555 | end | |
556 | keyDeb2=false | |
557 | elseif key=="e" and keyDeb2==false and switch2==true then keyDeb2=true switch2=false | |
558 | attackLabel2.Text="Disguise(E)" | |
559 | for i, v in pairs(attackLabel2:children()) do | |
560 | pcall(function()v:remove()end) | |
561 | end | |
562 | keyDeb2=false | |
563 | end | |
564 | end) | |
565 | findStab() | |
566 | end) | |
567 | bin.Deselected:connect(function() | |
568 | Equip:play() | |
569 | for i=0, 1, .1 do wait() | |
570 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), math.rad(180)*i, 0) | |
571 | obj.EdgeTopRW.C1=CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
572 | obj.EdgeTopR2W.C1=CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
573 | end | |
574 | switch2=false using=false for i, v in pairs(attackLabel2:children()) do pcall(function()v:remove()end) end removeParts() end)--mediafire |