SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has been converted to FE by iPxter | |
2 | ||
3 | ||
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 | end | |
75 | ||
76 | --==Made by LuisPambid==-- | |
77 | ||
78 | ||
79 | local player=owner | |
80 | local char=player.Character | |
81 | repeat wait() until player and char | |
82 | local torso=char.Torso | |
83 | local head=char.Head | |
84 | local human=char.Humanoid | |
85 | local arm={Left=char["Left Arm"], Right=char["Right Arm"]} | |
86 | local leg={Left=char["Left Leg"], Right=char["Right Leg"]} | |
87 | local c=function(f) coroutine.resume(coroutine.create(f)) end | |
88 | local p=function(f) pcall(f) end | |
89 | local add = { | |
90 | Part=function(par, a, c, col, t, s, cf, ms) | |
91 | 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) | |
92 | local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end) | |
93 | return p | |
94 | end, | |
95 | Wedge=function(par, a, c, col, t, s, cf, ms) | |
96 | 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) | |
97 | local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end) | |
98 | return p | |
99 | end, | |
100 | Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos) | |
101 | 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) | |
102 | return g | |
103 | end, | |
104 | Weld=function(par, p1, cf) | |
105 | local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new() end) | |
106 | return w | |
107 | end, | |
108 | Mesh=function(ins, par, s, of, t) | |
109 | local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new() m.Offset=of or Vector3.new() m.MeshType=t end) | |
110 | return m | |
111 | end, | |
112 | Sound=function(parent, id, volume, pitch) | |
113 | local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume s.Pitch=pitch end) | |
114 | return s | |
115 | end, | |
116 | } | |
117 | local scriptname="Spy" --Name here | |
118 | pcall(function() player.Backpack[scriptname]:remove() char[scriptname]:remove() char["Objects"]:remove() player.PlayerGui[scriptname]:remove() end) | |
119 | local model=Instance.new("Model", char) model.Name="Objects" | |
120 | local modelB=Instance.new("Model", char) modelB.Name=scriptname | |
121 | local gui=Instance.new("ScreenGui", player.PlayerGui) gui.Name=scriptname | |
122 | local bin=Instance.new("HopperBin", player.Backpack) bin.Name=scriptname | |
123 | local skincolor="Really black" | |
124 | local body={} | |
125 | local animate={} | |
126 | local obj={} | |
127 | function createParts() | |
128 | --==PARTS==-- | |
129 | body.Torso=add.Part(model, false, false, skincolor, 1, Vector3.new(2, 2, 1), nil) | |
130 | 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) | |
131 | 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) | |
132 | --==WELDS==-- | |
133 | body.TorsoW=add.Weld(body.Torso, torso, nil) | |
134 | 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)) | |
135 | 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)) | |
136 | --==MESHES==-- | |
137 | add.Weld(arm.Left, body.ArmLeft, CFrame.new(0, -.5, 0)) | |
138 | add.Weld(arm.Right, body.ArmRight, CFrame.new(0, -.5, 0)) | |
139 | torso["Left Hip"].Part0=body.Torso | |
140 | torso["Right Hip"].Part0=body.Torso | |
141 | --------------------------------------------------------------------------------------- | |
142 | animate={ | |
143 | ["Torso"]=function(cf) body.Torso.Transparency=0 torso.Transparency=1 | |
144 | body.TorsoW.C1=cf | |
145 | end; | |
146 | ["ArmLeft"]=function(cf) | |
147 | body.ArmLeftW.C1=CFrame.new(-1.5, .5, 0)*cf | |
148 | end; | |
149 | ["ArmRight"]=function(cf) | |
150 | body.ArmRightW.C1=CFrame.new(1.5, .5, 0)*cf | |
151 | end; | |
152 | ["LegLeft"]=function(cf) | |
153 | body.LegLeftW.C1=CFrame.new(-.5, -1.5, 0)*cf | |
154 | end; | |
155 | ["LegRight"]=function(cf) | |
156 | body.LegRightW.C1=CFrame.new(.5, -1.5, 0)*cf | |
157 | end; | |
158 | } | |
159 | --==Objects==-- | |
160 | obj.HandleBack=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, 1, .2), nil) | |
161 | obj.HandleBackW=add.Weld(obj.HandleBack, body.ArmRight, CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, 0)) | |
162 | obj.EdgeBot=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
163 | obj.EdgeBotM=add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil) | |
164 | obj.EdgeBotW=add.Weld(obj.EdgeBot, obj.HandleBack, CFrame.new(0, -.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
165 | obj.EdgeTopR=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
166 | obj.EdgeTopRM=add.Mesh("CylinderMesh", obj.EdgeTopR, Vector3.new(1, 1, 1), nil, nil) | |
167 | obj.EdgeTopRW=add.Weld(obj.EdgeTopR, obj.HandleBack, CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
168 | ||
169 | obj.Blade=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .8, .2), nil) | |
170 | obj.BladeM=add.Mesh("BlockMesh", obj.Blade, Vector3.new(.5, 1, 1), nil, nil) | |
171 | obj.BladeW=add.Weld(obj.Blade, obj.EdgeTopR, CFrame.new(-.1, 0, -.4)*CFrame.Angles(-math.rad(90), math.rad(90), 0)) | |
172 | obj.Point=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .4, .2), nil) | |
173 | obj.PointM=add.Mesh("SpecialMesh", obj.Point, Vector3.new(.5, 1, .5), nil, "Wedge") | |
174 | obj.PointW=add.Weld(obj.Point, obj.Blade, CFrame.new(0, .6, .05)*CFrame.Angles(0, math.rad(180), 0)) | |
175 | obj.Point2=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .4, .2), nil) | |
176 | obj.Point2M=add.Mesh("SpecialMesh", obj.Point2, Vector3.new(.5, 1, .5), nil, "Wedge") | |
177 | obj.Point2W=add.Weld(obj.Point2, obj.Blade, CFrame.new(0, .6, -.05)) | |
178 | ||
179 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
180 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
181 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeBot, nil) | |
182 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
183 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
184 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeTopR, nil) | |
185 | ||
186 | obj.EdgeTopR2=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
187 | obj.EdgeTopR2M=add.Mesh("CylinderMesh", obj.EdgeTopR2, Vector3.new(1, 1, 1), nil, nil) | |
188 | obj.EdgeTopR2W=add.Weld(obj.EdgeTopR2, obj.Blade, CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
189 | obj.HandleFor=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, 1, .2), nil) | |
190 | obj.HandleForW=add.Weld(obj.HandleFor, obj.EdgeTopR2, CFrame.new(0, 0, .5)*CFrame.Angles(-math.rad(90), -math.rad(90), 0)) | |
191 | obj.EdgeBot=add.Part(modelB, false, false, "Really black", 0, Vector3.new(.2, .2, .2), nil) | |
192 | obj.EdgeBotM=add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil) | |
193 | obj.EdgeBotW=add.Weld(obj.EdgeBot, obj.HandleFor, CFrame.new(0, -.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(90))) | |
194 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
195 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
196 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeBot, nil) | |
197 | obj.Joints=add.Part(modelB, false, false, "Gold", 0, Vector3.new(.2, .25, .2), nil) | |
198 | obj.JointsM=add.Mesh("CylinderMesh", obj.Joints, Vector3.new(.5, 1, .5), nil, nil) | |
199 | obj.JointsW=add.Weld(obj.Joints, obj.EdgeTopR2, nil) | |
200 | end | |
201 | function removeParts() | |
202 | p(function() | |
203 | if torso then | |
204 | torso["Left Hip"].Part0=torso | |
205 | torso["Right Hip"].Part0=torso | |
206 | end | |
207 | 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 | |
208 | end) | |
209 | end | |
210 | --Variables-- | |
211 | local trailDeb=false | |
212 | local using=false | |
213 | local combo=1 | |
214 | local onStab=false | |
215 | local keyDeb=false | |
216 | local switch=false | |
217 | local switch2=false | |
218 | local keyDeb2=false | |
219 | local hitDeb=false | |
220 | local dmg=math.random(5, 10) | |
221 | local speed=20 | |
222 | local pitch=.8 | |
223 | local Slash=add.Sound(torso, "rbxasset://sounds//swordslash.wav", 2, pitch) | |
224 | local Hit=add.Sound(torso, "http://www.roblox.com/asset/?id=30715280", 2, 2) | |
225 | local Abscond=add.Sound(torso, "http://www.roblox.com/asset/?id=2767090", 2, 2) | |
226 | local Equip=add.Sound(torso, "http://www.roblox.com/asset/?id=13510737", 2, 2) | |
227 | 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)) | |
228 | 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)) | |
229 | ||
230 | function lightningGen(startPos, endPos) | |
231 | local magnitude=(startPos-endPos).magnitude | |
232 | local distance=(startPos+endPos)/2 | |
233 | local pattern=add.Part(workspace, true, false, "Gold", 1, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPos)) | |
234 | local startPosProx=startPos | |
235 | for i=1, 9 do | |
236 | local startPosProx2=startPosProx | |
237 | local random=Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)) | |
238 | local findSize=pattern.Size.z/10 | |
239 | local findOffSet=pattern.CFrame.lookVector*-1 | |
240 | local compute=i*findSize*findOffSet | |
241 | local newStartPos=startPos | |
242 | local newEndPos=CFrame.new(random+compute+newStartPos).p | |
243 | local magnitude=(startPosProx2-newEndPos).magnitude | |
244 | local distance=(startPosProx2+newEndPos)/2 | |
245 | local lightning=add.Part(workspace, true, false, "Bright yellow", 0, Vector3.new(.2, .2, magnitude), CFrame.new(distance, startPosProx2)) | |
246 | c(function() | |
247 | for i=0, 1, .1 do wait() | |
248 | lightning.Transparency=i | |
249 | end | |
250 | lightning:remove() | |
251 | end) | |
252 | startPosProx=newEndPos | |
253 | end | |
254 | pattern:remove() | |
255 | end | |
256 | function computePos(pos, pos2) | |
257 | local pos3=Vector3.new(pos2.x, pos.y, pos2.z) | |
258 | torso.CFrame=CFrame.new(pos, pos3) | |
259 | return pos3 | |
260 | end | |
261 | function nearTorso(pos, dis) | |
262 | local temp | |
263 | local distance=dis | |
264 | for i, v in pairs(workspace:children()) do | |
265 | if v:isA("Model") then | |
266 | temp=v:findFirstChild("Torso") | |
267 | local humanoid=v:findFirstChild("Humanoid") | |
268 | if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then | |
269 | distance=(temp.CFrame.p-pos).magnitude | |
270 | return temp | |
271 | end | |
272 | end | |
273 | end | |
274 | end | |
275 | function trail(pos, cf, col) | |
276 | c(function() | |
277 | local old=(pos.CFrame*cf).p | |
278 | while trailDeb==true do | |
279 | wait() | |
280 | local new=(pos.CFrame*cf).p | |
281 | local mag=(old-new).magnitude | |
282 | local dis=(old+new)/2 | |
283 | 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" | |
284 | local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(.5, 1, .5), nil, nil) | |
285 | old=new | |
286 | c(function() | |
287 | for i=1, 0, -.1 do | |
288 | wait() | |
289 | tMesh.Scale=tMesh.Scale*Vector3.new(i, 1, i) | |
290 | end | |
291 | trail:remove() | |
292 | end) | |
293 | c(function() | |
294 | for i=0, 1, .1 do | |
295 | wait() | |
296 | trail.Transparency=i | |
297 | end | |
298 | end) | |
299 | end | |
300 | end) | |
301 | end | |
302 | ||
303 | function running() | |
304 | animate.ArmLeft(CFrame.Angles(-math.rad(45), 0, -math.rad(15))) | |
305 | animate.ArmRight(CFrame.Angles(math.rad(45), 0, math.rad(15))) | |
306 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, 0) | |
307 | end | |
308 | ||
309 | function hit(h) | |
310 | if using==true then | |
311 | if switch==false then | |
312 | if onStab==false and h.Parent:findFirstChild("Humanoid") and h.Parent~=char and hitDeb==false then hitDeb=true print("ErrorUnNamed") Hit:play() | |
313 | local hHuman=h.Parent:findFirstChild("Humanoid") | |
314 | hHuman.Health=hHuman.Health-dmg | |
315 | local fakeM=Instance.new("Model", workspace) fakeM.Name=-dmg | |
316 | local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0 | |
317 | local effect=add.Part(fakeM, false, false, "Gold", 0, Vector3.new(1, 1, 1), h.CFrame) effect.Name="Head" | |
318 | local fakeMesh=add.Mesh("CylinderMesh", effect, Vector3.new(1, .5, 1), nil, nil) | |
319 | 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) | |
320 | game.Debris:addItem(fakeM, 2) | |
321 | wait(1) | |
322 | hitDeb=false | |
323 | end | |
324 | if onStab==true and h.Parent~=char and h.Parent:findFirstChild("Humanoid") and hitDeb==false then hitDeb=true print("Error") Hit:play() | |
325 | h.Parent:breakJoints() | |
326 | local fakeM=Instance.new("Model", workspace) fakeM.Name="Tr1st4bb3d" | |
327 | local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0 | |
328 | local effect=add.Part(fakeM, false, false, "Bright red", 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 | end | |
336 | end | |
337 | end | |
338 | ||
339 | function findStab() | |
340 | while using==false do wait() | |
341 | --pcall(function() | |
342 | local nTorso=nearTorso(torso.CFrame.p, 3) | |
343 | if nTorso then | |
344 | local offSet=nTorso.CFrame:toObjectSpace(torso.CFrame) | |
345 | if offSet.z>0 then | |
346 | onStab=true | |
347 | animate.ArmRight(CFrame.Angles(math.rad(135), 0, 0)) | |
348 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(math.rad(90), 0, 0) | |
349 | else | |
350 | onStab=false | |
351 | running() | |
352 | end | |
353 | else | |
354 | onStab=false | |
355 | running() | |
356 | end | |
357 | --end) | |
358 | end | |
359 | end | |
360 | ||
361 | function attack() combo=combo+1 | |
362 | if using==false then using=true for i, v in pairs(modelB:children()) do v.Touched:connect(hit) end | |
363 | if combo==1 and onStab==false then Slash:play() | |
364 | --[[trailDeb=true | |
365 | trail(obj.Blade, CFrame.new(0, 1, 0), "Gold")]] | |
366 | for i=0, 1, .2 do wait() | |
367 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
368 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, 0)) | |
369 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, math.rad(45)*i) | |
370 | end | |
371 | for i=1, 0, -.2 do wait() | |
372 | animate.Torso(CFrame.Angles(0, math.rad(45)*i, 0)) | |
373 | animate.ArmRight(CFrame.Angles(math.rad(90)*i, 0, 0)) | |
374 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), 0, math.rad(45)*i) | |
375 | end | |
376 | if combo>1 and onStab==false then combo=2 Slash:play() | |
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, math.rad(45)*i)) | |
380 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90+(90*i)), 0, 0) | |
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, math.rad(45)*i)) | |
385 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90+(90*i)), 0, 0) | |
386 | end | |
387 | end | |
388 | end | |
389 | if onStab==true then | |
390 | for i=0, 1, .2 do wait() | |
391 | animate.ArmRight(CFrame.Angles(math.rad(135-(45*i)), 0, 0)) | |
392 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(math.rad(90), 0, 0) | |
393 | end | |
394 | onStab=false | |
395 | end | |
396 | using=false | |
397 | --trailDeb=false | |
398 | combo=0 | |
399 | body.Torso.Transparency=1 torso.Transparency=0 | |
400 | running() | |
401 | findStab() | |
402 | end | |
403 | end | |
404 | ||
405 | bin.Selected:connect(function(mouse) createParts() | |
406 | human.WalkSpeed=speed | |
407 | running() | |
408 | using=true | |
409 | Equip:play() | |
410 | for i=1, 0, -.1 do wait() | |
411 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), math.rad(180)*i, 0) | |
412 | obj.EdgeTopRW.C1=CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
413 | obj.EdgeTopR2W.C1=CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
414 | end | |
415 | using=false | |
416 | mouse.Button1Down:connect(attack) | |
417 | mouse.KeyDown:connect(function(key) | |
418 | local key=key:lower() | |
419 | --INVISBLE-- | |
420 | if key=="q" and keyDeb==false and switch==false and using==false then keyDeb=true switch=true using=true | |
421 | attackLabel.Text="Visible(Q)" print("1") Abscond:play() | |
422 | pcall(function() char.Sound.Disabled=true end) | |
423 | for i, v in pairs(char:children()) do | |
424 | c(function() | |
425 | for i=0, 1, .2 do wait() | |
426 | pcall(function() | |
427 | c(function() if v.Head~=nil then head.Transparency=1 end end) | |
428 | v.Transparency=i | |
429 | end) | |
430 | pcall(function() v.Handle.Transparency=i end) | |
431 | pcall(function() v.face.Transparency=i end) | |
432 | pcall(function() v.roblox.Transparency=i end) | |
433 | pcall(function() v.Head.Transparency=i end) | |
434 | end | |
435 | end) | |
436 | end | |
437 | for i, v in pairs(modelB:children()) do | |
438 | c(function() | |
439 | for i=0, 1, .2 do wait() | |
440 | pcall(function() | |
441 | v.Transparency=i | |
442 | end) | |
443 | pcall(function() v.Handle.Transparency=i end) | |
444 | pcall(function() v.face.Transparency=i end) | |
445 | end | |
446 | end) | |
447 | end | |
448 | wait(.5) | |
449 | local fakeModel=Instance.new("Model", workspace.CurrentCamera) fakeModel.Name="Spy" | |
450 | local fakeHumanoid=Instance.new("Humanoid", fakeModel) fakeHumanoid.Health=0 fakeHumanoid.MaxHealth=0 | |
451 | local fakeHead=add.Part(fakeModel, false, false, "Really black", 0, Vector3.new(1, 1, 1), nil) fakeHead.Name="Head" | |
452 | local fakeHeadM=add.Mesh("SpecialMesh", fakeHead, Vector3.new(1, 1.5, 1), nil, "File") | |
453 | fakeHeadM.MeshId="http://www.roblox.com/Asset/?id=9756362" | |
454 | local fakeHeadW=add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0)) | |
455 | modelB.Parent=workspace.CurrentCamera | |
456 | for i, v in pairs(modelB:children()) do | |
457 | c(function() | |
458 | for i=0, 1, .2 do wait() | |
459 | pcall(function() | |
460 | v.Transparency=.5 | |
461 | end) | |
462 | pcall(function() v.Handle.Transparency=.5 end) | |
463 | pcall(function() v.face.Transparency=.5 end) | |
464 | end | |
465 | end) | |
466 | end | |
467 | keyDeb=false | |
468 | elseif key=="q" and keyDeb==false and switch==true and using==true then keyDeb=true switch=false using=false | |
469 | attackLabel.Text="Invisible(Q)" print("2") Abscond:play() | |
470 | pcall(function() char.Sound.Disabled=false end) | |
471 | modelB.Parent=char | |
472 | for i, v in pairs(char:children()) do | |
473 | c(function() | |
474 | for i=1, 0, -.2 do wait() | |
475 | pcall(function() | |
476 | c(function() if v.Head~=nil then head.Transparency=1 end end) | |
477 | v.Transparency=i | |
478 | end) | |
479 | pcall(function() v.Handle.Transparency=i end) | |
480 | pcall(function() v.face.Transparency=i end) | |
481 | pcall(function() v.roblox.Transparency=i end) | |
482 | pcall(function() v.Head.Transparency=i end) | |
483 | end | |
484 | end) | |
485 | end | |
486 | for i, v in pairs(modelB:children()) do | |
487 | c(function() | |
488 | for i=1, 0, -.2 do wait() | |
489 | pcall(function() | |
490 | v.Transparency=i | |
491 | end) | |
492 | pcall(function() v.Handle.Transparency=i end) | |
493 | pcall(function() v.face.Transparency=i end) | |
494 | end | |
495 | end) | |
496 | end | |
497 | for i, v in pairs(workspace.CurrentCamera:children()) do pcall(function() v:remove() end) end | |
498 | wait(.5) | |
499 | keyDeb=false | |
500 | findStab() | |
501 | end | |
502 | --DISGUISE MENU-- | |
503 | local xSpace=0 | |
504 | if key=="e" and keyDeb2==false and switch2==false then keyDeb2=true switch2=true | |
505 | attackLabel2.Text="Menu:" | |
506 | for i, v in pairs(game.Players:children()) do | |
507 | if v~=player then xSpace=xSpace+1 | |
508 | 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)) | |
509 | playersLabel.MouseButton1Click:connect(function() Abscond:play() | |
510 | pcall(function() | |
511 | for i, v in pairs(char:children()) do | |
512 | pcall(function() v.face:remove() end) | |
513 | pcall(function() v.roblox:remove() end) | |
514 | pcall(function() v.Head:remove() end) | |
515 | if v:IsA("BodyColors") then v:remove() end | |
516 | if v:IsA("Hat") then v:remove() end | |
517 | if v:IsA("ShirtGraphic") then v:remove() end | |
518 | if v:IsA("Pants") then v:remove() end | |
519 | if v:IsA("Shirt") then v:remove() end | |
520 | if v:IsA("CharacterMesh") then v:remove() end | |
521 | if v:IsA("BodyColors") then v:remove() end | |
522 | end | |
523 | for i, v in pairs(game.Players[playersLabel.Text].Character:children()) do | |
524 | pcall(function() local cloned=v.face:clone() cloned.Parent=head if switch==true then pcall(function() cloned.Transparency=1 end) end end) | |
525 | pcall(function() v.roblox:clone().Parent=torso end) | |
526 | if v:IsA("BodyColors") then v:clone().Parent=char end | |
527 | 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 | |
528 | if v:IsA("ShirtGraphic") then v:clone().Parent=char end | |
529 | if v:IsA("Pants") then v:clone().Parent=char end | |
530 | if v:IsA("Shirt") then v:clone().Parent=char end | |
531 | if v:IsA("CharacterMesh") then v:clone().Parent=char end | |
532 | if v:IsA("BodyColors") then v:clone().Parent=char end | |
533 | end | |
534 | head.Transparency=1 | |
535 | local fakeModel=Instance.new("Model", char) fakeModel.Name=playersLabel.Text | |
536 | local fakeHumanoid=Instance.new("Humanoid", fakeModel) fakeHumanoid.Health=125 fakeHumanoid.MaxHealth=125 | |
537 | local fakeHead=add.Part(fakeModel, false, false, game.Players[playersLabel.Text].Character.Head.Color, 0, Vector3.new(1, 1, 1), nil) fakeHead.Name="Head" | |
538 | if switch==true then fakeHead.Transparency=1 end | |
539 | local fakeHeadM=add.Mesh("SpecialMesh", fakeHead, Vector3.new(1.25, 1.25, 1.25), nil, "Head") | |
540 | local fakeHeadW=add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0)) | |
541 | end) | |
542 | end) | |
543 | end | |
544 | end | |
545 | keyDeb2=false | |
546 | elseif key=="e" and keyDeb2==false and switch2==true then keyDeb2=true switch2=false | |
547 | attackLabel2.Text="Disguise(E)" | |
548 | for i, v in pairs(attackLabel2:children()) do | |
549 | pcall(function()v:remove()end) | |
550 | end | |
551 | keyDeb2=false | |
552 | end | |
553 | end) | |
554 | findStab() | |
555 | end) | |
556 | bin.Deselected:connect(function() | |
557 | Equip:play() | |
558 | for i=0, 1, .1 do wait() | |
559 | obj.HandleBackW.C1=CFrame.new(0, -1.5, 0)*CFrame.Angles(-math.rad(90), math.rad(180)*i, 0) | |
560 | obj.EdgeTopRW.C1=CFrame.new(0, .5, 0)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
561 | obj.EdgeTopR2W.C1=CFrame.new(0, -.4, -.1)*CFrame.Angles(math.rad(90)+math.rad(180)*i, 0, math.rad(90)) | |
562 | end |