SHOW:
|
|
- or go back to the newest paste.
1 | - | wait() |
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 wait() | |
6 | player = game.Players.LocalPlayer | |
7 | char = player.Character | |
8 | mouse = player:GetMouse() | |
9 | ||
10 | print("WHAT UP") | |
11 | ||
12 | armed = false | |
13 | canfire = false | |
14 | enabled = true | |
15 | equipped = false | |
16 | ||
17 | mouse.Icon = "rbxassetid://311756275" | |
18 | ||
19 | rightshoulder = char.Torso["Right Shoulder"]:Clone() | |
20 | leftshoulder = char.Torso["Left Shoulder"]:Clone() | |
21 | torso = char.HumanoidRootPart.RootJoint:Clone() | |
22 | ||
23 | hed = Instance.new("Weld", char.Torso) | |
24 | hed.Part0 = char.Torso | |
25 | hed.Part1 = char.Head | |
26 | hed.C0 = CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0) | |
27 | ||
28 | -- the bow stuff | |
29 | ||
30 | bow = Instance.new("Model") | |
31 | bow.Parent = game.Workspace | |
32 | bow.Name = "bow" | |
33 | ||
34 | handle = Instance.new("Part") | |
35 | handle.CFrame = CFrame.new(Vector3.new(-48.1999893, 2.79998732, -58.2000122)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
36 | handle.Size = Vector3.new(0.200000003, 1.20000005, 0.200000003) | |
37 | handle.BrickColor = BrickColor.new("Pine Cone") | |
38 | handle.Friction = 0.30000001192093 | |
39 | handle.Shape = Enum.PartType.Block | |
40 | handle.Name = "Handle" | |
41 | handle.Parent = bow | |
42 | handle.CanCollide = false | |
43 | ||
44 | leg2 = Instance.new("Part") | |
45 | leg2.CFrame = CFrame.new(Vector3.new(-48.1999931, 1.25002313, -58.2000008)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
46 | leg2.Size = Vector3.new(0.200000003, 1.90000021, 0.200000003) | |
47 | leg2.BrickColor = BrickColor.new("Pine Cone") | |
48 | leg2.Friction = 0.30000001192093 | |
49 | leg2.Shape = Enum.PartType.Block | |
50 | leg2.Name = "Leg2" | |
51 | leg2.Parent = bow | |
52 | leg2.CanCollide = false | |
53 | ||
54 | cap2 = Instance.new("Part") | |
55 | cap2.CFrame = CFrame.new(Vector3.new(-48.2000046, 0.300019979, -58.2000008)) * CFrame.Angles(1.5707963705063, 0, -0) | |
56 | cap2.TopSurface = Enum.SurfaceType.Smooth | |
57 | cap2.BottomSurface = Enum.SurfaceType.Smooth | |
58 | cap2.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
59 | cap2.BrickColor = BrickColor.new("Pine Cone") | |
60 | cap2.Friction = 0.30000001192093 | |
61 | cap2.Shape = Enum.PartType.Cylinder | |
62 | cap2.Name = "Cap2" | |
63 | cap2.Parent = bow | |
64 | cap2.CanCollide = false | |
65 | ||
66 | joint2 = Instance.new("Part") | |
67 | joint2.CFrame = CFrame.new(Vector3.new(-48.1999893, 2.19999003, -58.2000237)) * CFrame.Angles(1.5707963705063, 0, -0) | |
68 | joint2.TopSurface = Enum.SurfaceType.Smooth | |
69 | joint2.BottomSurface = Enum.SurfaceType.Smooth | |
70 | joint2.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
71 | joint2.BrickColor = BrickColor.new("Pine Cone") | |
72 | joint2.Friction = 0.30000001192093 | |
73 | joint2.Shape = Enum.PartType.Cylinder | |
74 | joint2.Name = "Joint2" | |
75 | joint2.Parent = bow | |
76 | joint2.CanCollide = false | |
77 | ||
78 | joint1 = Instance.new("Part") | |
79 | joint1.CFrame = CFrame.new(Vector3.new(-48.2000008, 3.39998126, -58.2000275)) * CFrame.Angles(1.5707963705063, 0, -0) | |
80 | joint1.TopSurface = Enum.SurfaceType.Smooth | |
81 | joint1.BottomSurface = Enum.SurfaceType.Smooth | |
82 | joint1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
83 | joint1.BrickColor = BrickColor.new("Pine Cone") | |
84 | joint1.Friction = 0.30000001192093 | |
85 | joint1.Shape = Enum.PartType.Cylinder | |
86 | joint1.Name = "Joint1" | |
87 | joint1.Parent = bow | |
88 | joint1.CanCollide = false | |
89 | ||
90 | leg1 = Instance.new("Part") | |
91 | leg1.CFrame = CFrame.new(Vector3.new(-48.1999931, 4.35000753, -58.2000122)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
92 | leg1.Size = Vector3.new(0.200000003, 1.90000021, 0.200000003) | |
93 | leg1.BrickColor = BrickColor.new("Pine Cone") | |
94 | leg1.Friction = 0.30000001192093 | |
95 | leg1.Shape = Enum.PartType.Block | |
96 | leg1.Name = "Leg1" | |
97 | leg1.Parent = bow | |
98 | leg1.CanCollide = false | |
99 | ||
100 | cap1 = Instance.new("Part") | |
101 | cap1.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
102 | cap1.TopSurface = Enum.SurfaceType.Smooth | |
103 | cap1.BottomSurface = Enum.SurfaceType.Smooth | |
104 | cap1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
105 | cap1.BrickColor = BrickColor.new("Pine Cone") | |
106 | cap1.Friction = 0.30000001192093 | |
107 | cap1.Shape = Enum.PartType.Cylinder | |
108 | cap1.Name = "Cap1" | |
109 | cap1.Parent = bow | |
110 | cap1.CanCollide = false | |
111 | ||
112 | stringpart = Instance.new("Part") | |
113 | stringpart.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
114 | stringpart.TopSurface = Enum.SurfaceType.Smooth | |
115 | stringpart.BottomSurface = Enum.SurfaceType.Smooth | |
116 | stringpart.Size = Vector3.new(0.1, 0.1, 0.1) | |
117 | stringpart.Transparency = 1 | |
118 | stringpart.BrickColor = BrickColor.new("Mid grey") | |
119 | stringpart.Friction = 0.30000001192093 | |
120 | stringpart.Shape = Enum.PartType.Cylinder | |
121 | stringpart.Name = "StringAttachment" | |
122 | stringpart.Parent = bow | |
123 | stringpart.CanCollide = false | |
124 | ||
125 | arrow = Instance.new("Model") | |
126 | arrow.Parent = game.Workspace | |
127 | arrow.Name = "arrow" | |
128 | ||
129 | feather1 = Instance.new("WedgePart") | |
130 | feather1.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.90000844, -56.1500168)) * CFrame.Angles(-0, 0, -0) | |
131 | feather1.TopSurface = Enum.SurfaceType.Smooth | |
132 | feather1.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
133 | feather1.BrickColor = BrickColor.new("Crimson") | |
134 | feather1.Friction = 0.30000001192093 | |
135 | feather1.Name = "Feather" | |
136 | feather1.Parent = arrow | |
137 | feather1.CanCollide = false | |
138 | feather1.Transparency = 1 | |
139 | ||
140 | feather2 = Instance.new("WedgePart") | |
141 | feather2.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.50003171, -56.1500168)) * CFrame.Angles(-0, 0, -3.1415927410126) | |
142 | feather2.TopSurface = Enum.SurfaceType.Smooth | |
143 | feather2.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
144 | feather2.BrickColor = BrickColor.new("Crimson") | |
145 | feather2.Friction = 0.30000001192093 | |
146 | feather2.Name = "Feather" | |
147 | feather2.Parent = arrow | |
148 | feather2.CanCollide = false | |
149 | feather2.Transparency = 1 | |
150 | ||
151 | arrowhead = Instance.new("WedgePart") | |
152 | arrowhead.CFrame = CFrame.new(Vector3.new(-48.2999992, 2.80002427, -59.4500008)) * CFrame.Angles(-0, 0, -0) | |
153 | arrowhead.TopSurface = Enum.SurfaceType.Smooth | |
154 | arrowhead.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
155 | arrowhead.Friction = 0.30000001192093 | |
156 | arrowhead.Name = "Arrowhead" | |
157 | arrowhead.Parent = arrow | |
158 | arrowhead.CanCollide = false | |
159 | arrowhead.Transparency = 1 | |
160 | ||
161 | arrowcap = Instance.new("Part") | |
162 | arrowcap.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
163 | arrowcap.TopSurface = Enum.SurfaceType.Smooth | |
164 | arrowcap.BottomSurface = Enum.SurfaceType.Smooth | |
165 | arrowcap.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
166 | arrowcap.BrickColor = BrickColor.new("Dirt brown") | |
167 | arrowcap.Friction = 0.30000001192093 | |
168 | arrowcap.Shape = Enum.PartType.Cylinder | |
169 | arrowcap.Name = "ArrowCap" | |
170 | arrowcap.Parent = arrow | |
171 | arrowcap.CanCollide = false | |
172 | arrowcap.Transparency = 1 | |
173 | ||
174 | arrowbody = Instance.new("Part") | |
175 | arrowbody.CFrame = CFrame.new(Vector3.new(0, 3, 0)) * CFrame.Angles(-0, 0, -0) | |
176 | arrowbody.Size = Vector3.new(0.200000003, 0.200000003, 3.60000014) | |
177 | arrowbody.BrickColor = BrickColor.new("Dirt brown") | |
178 | arrowbody.Friction = 0.30000001192093 | |
179 | arrowbody.Shape = Enum.PartType.Block | |
180 | arrowbody.Name = "ArrowBody" | |
181 | arrowbody.Parent = arrow | |
182 | arrowbody.CanCollide = false | |
183 | arrowbody.Transparency = 1 | |
184 | ||
185 | feather3 = Instance.new("WedgePart") | |
186 | feather3.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.50004983, -55.9500198)) * CFrame.Angles(-0, 0, -3.1415927410126) | |
187 | feather3.TopSurface = Enum.SurfaceType.Smooth | |
188 | feather3.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
189 | feather3.BrickColor = BrickColor.new("Crimson") | |
190 | feather3.Friction = 0.30000001192093 | |
191 | feather3.Name = "Feather" | |
192 | feather3.Parent = arrow | |
193 | feather3.CanCollide = false | |
194 | feather3.Transparency = 1 | |
195 | ||
196 | feather4 = Instance.new("WedgePart") | |
197 | feather4.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.90003037, -55.9500198)) * CFrame.Angles(-0, 0, -0) | |
198 | feather4.TopSurface = Enum.SurfaceType.Smooth | |
199 | feather4.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
200 | feather4.BrickColor = BrickColor.new("Crimson") | |
201 | feather4.Friction = 0.30000001192093 | |
202 | feather4.Name = "Feather" | |
203 | feather4.Parent = arrow | |
204 | feather4.CanCollide = false | |
205 | feather4.Transparency = 1 | |
206 | ||
207 | -- the welds | |
208 | ||
209 | whandle = Instance.new("Weld", char["Left Arm"]) | |
210 | whandle.Part0 = char.Torso | |
211 | whandle.Part1 = handle | |
212 | whandle.C0 = CFrame.new(0, 0, 0.6) * CFrame.Angles(0, 0, math.rad(45)) | |
213 | ||
214 | wstringpart = Instance.new("Weld", handle) | |
215 | wstringpart.Part0 = handle | |
216 | wstringpart.Part1 = stringpart | |
217 | wstringpart.C0 = CFrame.new(0, -0.3, -0.3) * CFrame.new(0, 0, 0) | |
218 | ||
219 | wjoint1 = Instance.new("Weld", handle) | |
220 | wjoint1.Part0 = handle | |
221 | wjoint1.Part1 = joint1 | |
222 | wjoint1.C0 = CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0) | |
223 | ||
224 | wjoint2 = Instance.new("Weld", handle) | |
225 | wjoint2.Part0 = handle | |
226 | wjoint2.Part1 = joint2 | |
227 | wjoint2.C0 = CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0) | |
228 | ||
229 | wleg1 = Instance.new("Weld", joint1) | |
230 | wleg1.Part0 = joint1 | |
231 | wleg1.Part1 = leg1 | |
232 | wleg1.C0 = CFrame.new(0, 0.95, 0) * CFrame.Angles(0, 0, 0) | |
233 | ||
234 | wleg2 = Instance.new("Weld", joint2) | |
235 | wleg2.Part0 = joint2 | |
236 | wleg2.Part1 = leg2 | |
237 | wleg2.C0 = CFrame.new(0, -0.95, 0) * CFrame.Angles(0, 0, 0) | |
238 | ||
239 | wcap1 = Instance.new("Weld", leg1) | |
240 | wcap1.Part0 = leg1 | |
241 | wcap1.Part1 = cap1 | |
242 | wcap1.C0 = CFrame.new(0, 0.95, 0) * CFrame.Angles(0, 0, 0) | |
243 | ||
244 | wcap2 = Instance.new("Weld", leg2) | |
245 | wcap2.Part0 = leg2 | |
246 | wcap2.Part1 = cap2 | |
247 | wcap2.C0 = CFrame.new(0, -0.95, 0) * CFrame.Angles(0, 0, 0) | |
248 | ||
249 | cap1att = Instance.new("Attachment", cap1) | |
250 | cap1att.Position = Vector3.new(0, 0, -0.05) | |
251 | cap2att = Instance.new("Attachment", cap2) | |
252 | cap2att.Position = Vector3.new(0, 0, -0.05) | |
253 | stringatt = Instance.new("Attachment", stringpart) | |
254 | stringp1 = Instance.new("RodConstraint", stringpart) | |
255 | stringp1.Color = BrickColor.new("Mid grey") | |
256 | stringp1.Visible = true | |
257 | stringp1.Attachment0 = stringatt | |
258 | stringp1.Attachment1 = cap1att | |
259 | stringp2 = Instance.new("RodConstraint", stringpart) | |
260 | stringp2.Color = BrickColor.new("Mid grey") | |
261 | stringp2.Visible = true | |
262 | stringp2.Attachment0 = stringatt | |
263 | stringp2.Attachment1 = cap2att | |
264 | ||
265 | warrowhead1 = Instance.new("Weld", arrowbody) | |
266 | warrowhead1.Part0 = arrowbody | |
267 | warrowhead1.Part1 = arrowhead | |
268 | warrowhead1.C0 = CFrame.new(0, 0, -1.95) | |
269 | ||
270 | wfeather1 = Instance.new("Weld", arrowbody) | |
271 | wfeather1.Part0 = arrowbody | |
272 | wfeather1.Part1 = feather1 | |
273 | wfeather1.C0 = CFrame.new(0, 0.2, 1.45) | |
274 | ||
275 | wfeather2 = Instance.new("Weld", arrowbody) | |
276 | wfeather2.Part0 = arrowbody | |
277 | wfeather2.Part1 = feather2 | |
278 | wfeather2.C0 = CFrame.new(0, 0.2, 1.4) | |
279 | ||
280 | wfeather3 = Instance.new("Weld", arrowbody) | |
281 | wfeather3.Part0 = arrowbody | |
282 | wfeather3.Part1 = feather3 | |
283 | wfeather3.C0 = CFrame.new(0, -0.2, 1.45) * CFrame.Angles(0, 0, 3.15) | |
284 | ||
285 | wfeather4 = Instance.new("Weld", arrowbody) | |
286 | wfeather4.Part0 = arrowbody | |
287 | wfeather4.Part1 = feather4 | |
288 | wfeather4.C0 = CFrame.new(0, -0.2, 1.4) * CFrame.Angles(0, 0, 3.15) | |
289 | ||
290 | warrow = Instance.new("Weld", char.Torso) | |
291 | warrow.Part0 = char.Torso | |
292 | warrow.Part1 = arrowbody | |
293 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
294 | ||
295 | warrowcap = Instance.new("Weld", arrowbody) | |
296 | warrowcap.Part0 = arrowbody | |
297 | warrowcap.Part1 = arrowcap | |
298 | warrowcap.C0 = CFrame.new(0, 0, 1.8) | |
299 | ||
300 | -- sounds | |
301 | ||
302 | pullbacksound = Instance.new("Sound", handle) | |
303 | pullbacksound.SoundId = "rbxassetid://609348868" | |
304 | ||
305 | firesound = Instance.new("Sound", handle) | |
306 | firesound.SoundId = "rbxassetid://609348009" | |
307 | firesound.PlaybackSpeed = 1.05 | |
308 | ||
309 | function velocity(v) | |
310 | print("killvel") | |
311 | vel = coroutine.wrap(function() | |
312 | wait(0.05) | |
313 | v:Remove() | |
314 | end) | |
315 | vel() | |
316 | end | |
317 | ||
318 | function killz(playa,hitz,kneef) | |
319 | local heyy = hitz | |
320 | if hitz == "Right Arm" then | |
321 | local Limb = playa:FindFirstChild("Right Arm") | |
322 | local ters = playa:FindFirstChild('Torso') | |
323 | if Limb and ters then | |
324 | if ters:FindFirstChild('Right Shoulder') then ters["Right Shoulder"]:Destroy() end | |
325 | for i,v in pairs(Limb:GetChildren()) do | |
326 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
327 | v:Destroy() | |
328 | end | |
329 | end | |
330 | Limb.CFrame = ters.CFrame * CFrame.new(1.5, 0, 0) | |
331 | local Joint = Instance.new("Glue") | |
332 | Joint.Name = "RightShoulder" | |
333 | Joint.Part0 = ters | |
334 | Joint.Part1 = Limb | |
335 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
336 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
337 | Joint.Parent = ters | |
338 | ||
339 | local B = Instance.new("Part") | |
340 | B.TopSurface = 0 | |
341 | B.BottomSurface = 0 | |
342 | B.formFactor = "Symmetric" | |
343 | B.Size = Vector3.new(1, 1, 1) | |
344 | B.Transparency = 1 | |
345 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
346 | B.Parent = playa | |
347 | local W = Instance.new("Weld") | |
348 | W.Part0 = Limb | |
349 | W.Part1 = B | |
350 | W.C0 = CFrame.new(0, -0.5, 0) | |
351 | W.Parent = Limb | |
352 | local coru = coroutine.wrap(function() | |
353 | local uno = Instance.new('Part',workspace) | |
354 | local dos = Instance.new('Part',workspace) | |
355 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
356 | dos.CFrame = kneef.CFrame | |
357 | local weld = Instance.new('Weld',kneef) | |
358 | weld.Part0 = playa:FindFirstChild(hitz) | |
359 | weld.Part1 = kneef | |
360 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
361 | uno:Destroy() | |
362 | dos:Destroy() | |
363 | end) | |
364 | coru() | |
365 | end | |
366 | elseif hitz == "Left Arm" then | |
367 | local Limb = playa:FindFirstChild("Left Arm") | |
368 | local ters = playa:FindFirstChild('Torso') | |
369 | if Limb and ters then | |
370 | if ters:FindFirstChild('Left Shoulder') then ters["Left Shoulder"]:Destroy() end | |
371 | for i,v in pairs(Limb:GetChildren()) do | |
372 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
373 | v:Destroy() | |
374 | end | |
375 | end | |
376 | Limb.CFrame = ters.CFrame * CFrame.new(-1.5, 0, 0) | |
377 | local Joint = Instance.new("Glue") | |
378 | Joint.Name = "LeftShoulder" | |
379 | Joint.Part0 = ters | |
380 | Joint.Part1 = Limb | |
381 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
382 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
383 | Joint.Parent = ters | |
384 | ||
385 | local B = Instance.new("Part") | |
386 | B.TopSurface = 0 | |
387 | B.BottomSurface = 0 | |
388 | B.formFactor = "Symmetric" | |
389 | B.Size = Vector3.new(1, 1, 1) | |
390 | B.Transparency = 1 | |
391 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
392 | B.Parent = playa | |
393 | local W = Instance.new("Weld") | |
394 | W.Part0 = ters | |
395 | W.Part1 = B | |
396 | W.C0 = CFrame.new(0, -0.5, 0) | |
397 | W.Parent = Limb | |
398 | local coru = coroutine.wrap(function() | |
399 | local uno = Instance.new('Part',workspace) | |
400 | local dos = Instance.new('Part',workspace) | |
401 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
402 | dos.CFrame = kneef.CFrame | |
403 | local weld = Instance.new('Weld',kneef) | |
404 | weld.Part0 = playa:FindFirstChild(hitz) | |
405 | weld.Part1 = kneef | |
406 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
407 | uno:Destroy() | |
408 | dos:Destroy() | |
409 | end) | |
410 | coru() | |
411 | end | |
412 | elseif hitz == "Right Leg" then | |
413 | local Limb = playa:FindFirstChild("Right Leg") | |
414 | local ters = playa:FindFirstChild('Torso') | |
415 | if Limb and ters then | |
416 | if ters:FindFirstChild('Right Hip') then ters["Right Hip"]:Destroy() end | |
417 | for i,v in pairs(Limb:GetChildren()) do | |
418 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
419 | v:Destroy() | |
420 | end | |
421 | end | |
422 | Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0) | |
423 | local Joint = Instance.new("Glue") | |
424 | Joint.Name = "Right Hip" | |
425 | Joint.Part0 = ters | |
426 | Joint.Part1 = Limb | |
427 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
428 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
429 | Joint.Parent = ters | |
430 | local B = Instance.new("Part") | |
431 | B.TopSurface = 0 | |
432 | B.BottomSurface = 0 | |
433 | B.formFactor = "Symmetric" | |
434 | B.Size = Vector3.new(1, 1, 1) | |
435 | B.Transparency = 1 | |
436 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
437 | B.Parent = playa | |
438 | local W = Instance.new("Weld") | |
439 | W.Part0 = Limb | |
440 | W.Part1 = B | |
441 | W.C0 = CFrame.new(0, -0.5, 0) | |
442 | W.Parent = Limb | |
443 | local coru = coroutine.wrap(function() | |
444 | local uno = Instance.new('Part',workspace) | |
445 | local dos = Instance.new('Part',workspace) | |
446 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
447 | dos.CFrame = kneef.CFrame | |
448 | local weld = Instance.new('Weld',kneef) | |
449 | weld.Part0 = playa:FindFirstChild(hitz) | |
450 | weld.Part1 = kneef | |
451 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
452 | uno:Destroy() | |
453 | dos:Destroy() | |
454 | if playa:FindFirstChild('HumanoidRootPart') then | |
455 | if playa.HumanoidRootPart:FindFirstChild('RootJoint') then | |
456 | playa.HumanoidRootPart:FindFirstChild('RootJoint'):Destroy() | |
457 | wait() | |
458 | end | |
459 | while playa.HumanoidRootPart:FindFirstChild('RootJoint') do | |
460 | wait() | |
461 | end | |
462 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
463 | end | |
464 | end) | |
465 | coru() | |
466 | end | |
467 | elseif hitz == "Left Leg" then | |
468 | local Limb = playa:FindFirstChild("Left Leg") | |
469 | local ters = playa:FindFirstChild('Torso') | |
470 | if Limb and ters then | |
471 | if ters:FindFirstChild('Left Hip') then ters["Left Hip"]:Destroy() end | |
472 | for i,v in pairs(Limb:GetChildren()) do | |
473 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
474 | v:Destroy() | |
475 | end | |
476 | end | |
477 | Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0) | |
478 | Limb.CFrame = ters.CFrame * CFrame.new(-0.5, -2, 0) | |
479 | local Joint = Instance.new("Glue") | |
480 | Joint.Name = "LeftHip" | |
481 | Joint.Part0 = ters | |
482 | Joint.Part1 = Limb | |
483 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
484 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
485 | Joint.Parent = ters | |
486 | ||
487 | local B = Instance.new("Part") | |
488 | B.TopSurface = 0 | |
489 | B.BottomSurface = 0 | |
490 | B.formFactor = "Symmetric" | |
491 | B.Size = Vector3.new(1, 1, 1) | |
492 | B.Transparency = 1 | |
493 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
494 | B.Parent = playa | |
495 | local W = Instance.new("Weld") | |
496 | W.Part0 = Limb | |
497 | W.Part1 = B | |
498 | W.C0 = CFrame.new(0, -0.5, 0) | |
499 | W.Parent = Limb | |
500 | Limb.CanCollide = false | |
501 | local coru = coroutine.wrap(function() | |
502 | local uno = Instance.new('Part',workspace) | |
503 | local dos = Instance.new('Part',workspace) | |
504 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
505 | dos.CFrame = kneef.CFrame | |
506 | local weld = Instance.new('Weld',kneef) | |
507 | weld.Part0 = playa:FindFirstChild(hitz) | |
508 | weld.Part1 = kneef | |
509 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
510 | uno:Destroy() | |
511 | dos:Destroy() | |
512 | if playa:FindFirstChild('HumanoidRootPart') then | |
513 | if playa.HumanoidRootPart:FindFirstChild('RootJoint') then | |
514 | playa.HumanoidRootPart:FindFirstChild('RootJoint'):Destroy() | |
515 | end | |
516 | while playa.HumanoidRootPart:FindFirstChild('RootJoint') do | |
517 | wait() | |
518 | end | |
519 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
520 | end | |
521 | end) | |
522 | coru() | |
523 | end | |
524 | else | |
525 | local playa2 = playa | |
526 | playa.Archivable = true | |
527 | local playa = playa:Clone() | |
528 | playa.Archivable = false | |
529 | playa2:Destroy() | |
530 | playa.Parent = workspace | |
531 | local Gibs = game.Workspace | |
532 | local Torso = playa.Torso | |
533 | local Head = playa:FindFirstChild("Head") | |
534 | local function Scan(ch) | |
535 | local e | |
536 | for e = 1,#ch do | |
537 | Scan(ch[e]:GetChildren()) | |
538 | if (ch[e].ClassName == "Weld" and ch[e].Part1.Name ~= 'Projectile') or ch[e].ClassName == "Motor6D" then | |
539 | ch[e]:remove() | |
540 | end | |
541 | end | |
542 | end | |
543 | Scan(playa:GetChildren()) | |
544 | if playa:FindFirstChild('HumanoidRootPart') then | |
545 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
546 | end | |
547 | local hum2 = playa:FindFirstChildOfClass("Humanoid") | |
548 | ||
549 | ||
550 | if hum2 ~= nil then | |
551 | hum2.Name = "Humanoid2" | |
552 | hum2.PlatformStand = true | |
553 | hum2.Health = 0 | |
554 | end | |
555 | local ch = playa:GetChildren() | |
556 | local i | |
557 | for i = 1,#ch do | |
558 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
559 | ch[i]:remove() | |
560 | end | |
561 | end | |
562 | ||
563 | if Head then | |
564 | local Neck = Instance.new("Weld") | |
565 | Neck.Name = "Neck" | |
566 | Neck.Part0 = Torso | |
567 | Neck.Part1 = Head | |
568 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
569 | Neck.C1 = CFrame.new() | |
570 | Neck.Parent = Torso | |
571 | end | |
572 | local Limb = playa:FindFirstChild("Right Arm") | |
573 | if Limb then | |
574 | ||
575 | Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) | |
576 | local Joint = Instance.new("Glue") | |
577 | Joint.Name = "RightShoulder" | |
578 | Joint.Part0 = Torso | |
579 | Joint.Part1 = Limb | |
580 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
581 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
582 | Joint.Parent = Torso | |
583 | ||
584 | local B = Instance.new("Part") | |
585 | B.TopSurface = 0 | |
586 | B.BottomSurface = 0 | |
587 | B.formFactor = "Symmetric" | |
588 | B.Size = Vector3.new(1, 1, 1) | |
589 | B.Transparency = 1 | |
590 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
591 | B.Parent = playa | |
592 | local W = Instance.new("Weld") | |
593 | W.Part0 = Limb | |
594 | W.Part1 = B | |
595 | W.C0 = CFrame.new(0, -0.5, 0) | |
596 | W.Parent = Limb | |
597 | end | |
598 | local Limb = playa:FindFirstChild("Left Arm") | |
599 | if Limb then | |
600 | ||
601 | Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) | |
602 | local Joint = Instance.new("Glue") | |
603 | Joint.Name = "LeftShoulder" | |
604 | Joint.Part0 = Torso | |
605 | Joint.Part1 = Limb | |
606 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
607 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
608 | Joint.Parent = Torso | |
609 | ||
610 | local B = Instance.new("Part") | |
611 | B.TopSurface = 0 | |
612 | B.BottomSurface = 0 | |
613 | B.formFactor = "Symmetric" | |
614 | B.Size = Vector3.new(1, 1, 1) | |
615 | B.Transparency = 1 | |
616 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
617 | B.Parent = playa | |
618 | local W = Instance.new("Weld") | |
619 | W.Part0 = Limb | |
620 | W.Part1 = B | |
621 | W.C0 = CFrame.new(0, -0.5, 0) | |
622 | W.Parent = Limb | |
623 | end | |
624 | local Limb = playa:FindFirstChild("Right Leg") | |
625 | if Limb then | |
626 | ||
627 | Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0) | |
628 | local Joint = Instance.new("Glue") | |
629 | Joint.Name = "RightHip" | |
630 | Joint.Part0 = Torso | |
631 | Joint.Part1 = Limb | |
632 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
633 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
634 | Joint.Parent = Torso | |
635 | ||
636 | local B = Instance.new("Part") | |
637 | B.TopSurface = 0 | |
638 | B.BottomSurface = 0 | |
639 | B.formFactor = "Symmetric" | |
640 | B.Size = Vector3.new(1, 1, 1) | |
641 | B.Transparency = 1 | |
642 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
643 | B.Parent = playa | |
644 | local W = Instance.new("Weld") | |
645 | W.Part0 = Limb | |
646 | W.Part1 = B | |
647 | W.C0 = CFrame.new(0, -0.5, 0) | |
648 | W.Parent = Limb | |
649 | end | |
650 | local Limb = playa:FindFirstChild("Left Leg") | |
651 | if Limb then | |
652 | ||
653 | Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0) | |
654 | local Joint = Instance.new("Glue") | |
655 | Joint.Name = "LeftHip" | |
656 | Joint.Part0 = Torso | |
657 | Joint.Part1 = Limb | |
658 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
659 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
660 | Joint.Parent = Torso | |
661 | ||
662 | local B = Instance.new("Part") | |
663 | B.TopSurface = 0 | |
664 | B.BottomSurface = 0 | |
665 | B.formFactor = "Symmetric" | |
666 | B.Size = Vector3.new(1, 1, 1) | |
667 | B.Transparency = 1 | |
668 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
669 | B.Parent = playa | |
670 | local W = Instance.new("Weld") | |
671 | W.Part0 = Limb | |
672 | W.Part1 = B | |
673 | W.C0 = CFrame.new(0, -0.5, 0) | |
674 | W.Parent = Limb | |
675 | end | |
676 | --[ | |
677 | local Bar = Instance.new("Part") | |
678 | Bar.TopSurface = 0 | |
679 | Bar.BottomSurface = 0 | |
680 | Bar.formFactor = "Symmetric" | |
681 | Bar.Size = Vector3.new(1, 1, 1) | |
682 | Bar.Transparency = 1 | |
683 | Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0) | |
684 | Bar.Parent = playa | |
685 | local Weld = Instance.new("Weld") | |
686 | Weld.Part0 = Torso | |
687 | Weld.Part1 = Bar | |
688 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
689 | Weld.Parent = Torso | |
690 | --]] | |
691 | playa.Parent = Gibs | |
692 | local coru = coroutine.wrap(function() | |
693 | print(hitz.Name) | |
694 | local uno = Instance.new('Part',workspace) | |
695 | local dos = Instance.new('Part',workspace) | |
696 | uno.CFrame = playa:FindFirstChild(heyy).CFrame | |
697 | dos.CFrame = kneef.CFrame | |
698 | local weld = Instance.new('Weld',kneef) | |
699 | weld.Part0 = playa:FindFirstChild(heyy) | |
700 | weld.Part1 = kneef | |
701 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
702 | uno:Destroy() | |
703 | dos:Destroy() | |
704 | end) | |
705 | coru() | |
706 | game.Debris:AddItem(playa, 15) | |
707 | end | |
708 | end | |
709 | ||
710 | function checkarms() | |
711 | check = coroutine.wrap(function() | |
712 | rshould = char.Torso:FindFirstChild("Right Shoulder") | |
713 | lshould = char.Torso:FindFirstChild("Left Shoulder") | |
714 | ||
715 | if rshould == nil then | |
716 | rightshoulder:Clone().Parent = char.Torso | |
717 | end | |
718 | if lshould == nil then | |
719 | rightshoulder:Clone().Parent = char.Torso | |
720 | end | |
721 | end) | |
722 | check() | |
723 | end | |
724 | ||
725 | mouse.KeyDown:connect(function(k) | |
726 | key = k:lower() | |
727 | ||
728 | if key == "e" and enabled == true and equipped == true then | |
729 | if armed == false then | |
730 | tors = Instance.new("Weld", char.HumanoidRootPart) | |
731 | tors.Part0 = char.HumanoidRootPart | |
732 | tors.Part1 = char.Torso | |
733 | tors.C0 = CFrame.new(0, 0, 0) * CFrame.new(0, 0, 0) | |
734 | ||
735 | crarm = Instance.new("Weld", char.Torso) | |
736 | crarm.Part0 = char.Torso | |
737 | crarm.Part1 = char["Right Arm"] | |
738 | crarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(1.5, 0, 0) | |
739 | ||
740 | clarm = Instance.new("Weld", char.Torso) | |
741 | clarm.Part0 = char.Torso | |
742 | clarm.Part1 = char["Left Arm"] | |
743 | clarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0) | |
744 | ||
745 | enabled = false | |
746 | for i = 0, 1, 0.1 do | |
747 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 1.5, 0) * CFrame.Angles(3.14, 0, 0), i) | |
748 | wait() | |
749 | end | |
750 | for i, v in pairs(arrow:GetChildren()) do | |
751 | v.Transparency = 0 | |
752 | end | |
753 | feather1.Transparency = 0.25 | |
754 | feather2.Transparency = 0.25 | |
755 | feather3.Transparency = 0.25 | |
756 | feather4.Transparency = 0.25 | |
757 | ||
758 | warrow.Part0 = char["Right Arm"] | |
759 | warrow.C0 = CFrame.new(-0.5, -2.7, -0.2) * CFrame.Angles(-1.575, 0.075, -0.5) | |
760 | ||
761 | for i = 0, 1, 0.05 do | |
762 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, -1.5, 0), i) | |
763 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, -0.05, 0), i) | |
764 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.6, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
765 | crarm.C0 = crarm.C0:lerp(CFrame.new(-1.35, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575), i) | |
766 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0), i) | |
767 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0), i) | |
768 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0), i) | |
769 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 1.5, 0), i) | |
770 | wait() | |
771 | end | |
772 | pullbacksound:Play() | |
773 | warrow.Part0 = stringpart | |
774 | warrow.C0 = CFrame.new(-0.1, 0, 1.9) * CFrame.Angles(3.15, 0.04, 0) | |
775 | for i = 0, 1, 0.025 do | |
776 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, -1.5, 0), i) | |
777 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, -0.05, 0), i) | |
778 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.95, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
779 | crarm.C0 = crarm.C0:lerp(CFrame.new(1, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575), i) | |
780 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.4, 0, 0), i) | |
781 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.4, 0, 0), i) | |
782 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -3) * CFrame.new(0, 0, 0), i) | |
783 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, -0.1) * CFrame.Angles(0, 1.5, -0.25), i) | |
784 | wait() | |
785 | end | |
786 | armed = true | |
787 | enabled = true | |
788 | elseif armed == true and equipped == true then | |
789 | enabled = false | |
790 | for i = 0,1,0.05 do | |
791 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.6, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
792 | crarm.C0 = crarm.C0:lerp(CFrame.new(-1.3, 0.4, -1) * CFrame.Angles(1.575, 0.1, -1.575), i) | |
793 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0), i) | |
794 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0), i) | |
795 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0), i) | |
796 | wait() | |
797 | end | |
798 | warrow.Part0 = char["Right Arm"] | |
799 | warrow.C0 = CFrame.new(-0.5, -2.65, -0.2) * CFrame.Angles(-1.575, 0.075, -0.4) | |
800 | for i = 0,1,0.05 do | |
801 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 1.5, 0) * CFrame.Angles(3.14, 0, 0), i) | |
802 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
803 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
804 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
805 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
806 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0), i) | |
807 | wait() | |
808 | end | |
809 | ||
810 | for i, v in pairs(arrow:GetChildren()) do | |
811 | v.Transparency = 1 | |
812 | end | |
813 | warrow.Part0 = char.Torso | |
814 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
815 | ||
816 | for i = 0, 1, 0.1 do | |
817 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
818 | wait() | |
819 | end | |
820 | armed = false | |
821 | enabled = true | |
822 | clarm:Remove() | |
823 | crarm:Remove() | |
824 | tors:Remove() | |
825 | rightshoulder:Clone().Parent = char.Torso | |
826 | leftshoulder:Clone().Parent = char.Torso | |
827 | torso:Clone().Parent = char.HumanoidRootPart | |
828 | checkarms() | |
829 | end | |
830 | elseif key == "z" then | |
831 | if armed == true or enabled == false then return end | |
832 | clarm = Instance.new("Weld", char.Torso) | |
833 | clarm.Part0 = char.Torso | |
834 | clarm.Part1 = char["Left Arm"] | |
835 | clarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0) | |
836 | if equipped == false then | |
837 | enabled = false | |
838 | for i = 0, 1, 0.075 do | |
839 | clarm.C0 = clarm.C0:lerp(CFrame.new(-0.5, 0, 0.25) * CFrame.Angles(math.rad(-90), 0, math.rad(75)), i) | |
840 | wait() | |
841 | end | |
842 | whandle.C0 = CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0) | |
843 | whandle.Part0 = char["Left Arm"] | |
844 | for i = 0, 1, 0.075 do | |
845 | clarm.C0 = clarm.C0:lerp(CFrame.new(-2, 0.6, 0) * CFrame.Angles(0, 0, math.rad(-90)), i) | |
846 | wait() | |
847 | end | |
848 | for i = 0, 1, 0.075 do | |
849 | clarm.C0 = clarm.C0:lerp(CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0), i) | |
850 | wait() | |
851 | end | |
852 | enabled = true | |
853 | equipped = true | |
854 | elseif equipped == true then | |
855 | if armed == true or enabled == false then return end | |
856 | enabled = false | |
857 | for i = 0, 1, 0.075 do | |
858 | clarm.C0 = clarm.C0:lerp(CFrame.new(-2, 0.6, 0) * CFrame.Angles(0, 0, math.rad(-90)), i) | |
859 | wait() | |
860 | end | |
861 | for i = 0, 1, 0.075 do | |
862 | clarm.C0 = clarm.C0:lerp(CFrame.new(-0.5, 0, 0.25) * CFrame.Angles(math.rad(-90), 0, math.rad(75)), i) | |
863 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
864 | wait() | |
865 | end | |
866 | whandle.C0 = CFrame.new(0, 0, 0.6) * CFrame.Angles(0, 0, math.rad(45)) | |
867 | whandle.Part0 = char.Torso | |
868 | for i = 0, 1, 0.075 do | |
869 | clarm.C0 = clarm.C0:lerp(CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0), i) | |
870 | wait() | |
871 | end | |
872 | equipped = false | |
873 | enabled = true | |
874 | end | |
875 | clarm:Remove() | |
876 | leftshoulder:Clone().Parent = char.Torso | |
877 | end | |
878 | end) | |
879 | ||
880 | mouse.Button1Down:connect(function() | |
881 | if armed == false or enabled == false or equipped == false then return end | |
882 | firesound:Play() | |
883 | enabled = false | |
884 | armed = false | |
885 | wjoint1.C0 = CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0) | |
886 | wjoint2.C0 = CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0) | |
887 | wstringpart.C0 = CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0) | |
888 | crarm.C0 = CFrame.new(1.2, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575) | |
889 | newarrow = arrow:Clone() | |
890 | newarrow.Parent = game.Workspace | |
891 | newarrow.Name = "flyingarrow" | |
892 | newarrow.ArrowBody.CFrame = CFrame.new(newarrow.ArrowBody.CFrame.p, mouse.Hit.p)*CFrame.Angles(0,0,math.pi/1.15) | |
893 | char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.CFrame.p, mouse.Hit.p)*CFrame.Angles(0,math.pi/100,0) | |
894 | local fly = Instance.new('BodyVelocity',newarrow.ArrowBody) | |
895 | fly.Velocity = (newarrow.ArrowBody.CFrame*CFrame.Angles(0,0,math.pi/2)).lookVector*200 | |
896 | newarrow.Arrowhead.Touched:connect(function(hit) | |
897 | if hit.Parent and hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false and hit.Parent:FindFirstChildOfClass('Humanoid').Health > 0 and hit.Parent ~= char then | |
898 | velocity(fly) | |
899 | newarrow.Arrowhead.CanCollide = true | |
900 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
901 | tone = math.random(1, 3) | |
902 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
903 | if tone == 1 then sound.SoundId = "rbxassetid://220833967" end | |
904 | if tone == 2 then sound.SoundId = "rbxassetid://220833976" end | |
905 | if tone == 3 then sound.SoundId = "rbxassetid://220834000" end | |
906 | sound.PlaybackSpeed = 1 | |
907 | sound:Play() | |
908 | newarrow.Arrowhead.Anchored = true | |
909 | hit.Anchored = true | |
910 | if hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Name == "Torso" or hit.Name == "Head" then | |
911 | hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0 | |
912 | end | |
913 | wait() | |
914 | hit.Anchored = false | |
915 | newarrow.Arrowhead.Anchored = false | |
916 | killz(hit.Parent,hit.Name,newarrow.Arrowhead) | |
917 | elseif hit.Parent and hit.Parent.Parent:FindFirstChildOfClass('Humanoid') and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false and hit.Parent.Parent:FindFirstChildOfClass('Humanoid').Health > 0 and hit.Parent.Parent ~= char and hit.Parent.Parent:FindFirstChild('Head') then | |
918 | velocity(fly) | |
919 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
920 | newarrow.Arrowhead.CanCollide = true | |
921 | tone = math.random(1, 3) | |
922 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
923 | if tone == 1 then sound.SoundId = "rbxassetid://220833967" end | |
924 | if tone == 2 then sound.SoundId = "rbxassetid://220833976" end | |
925 | if tone == 3 then sound.SoundId = "rbxassetid://220834000" end | |
926 | sound.PlaybackSpeed = 1 | |
927 | sound:Play() | |
928 | newarrow.Arrowhead.Anchored = true | |
929 | hit.Anchored = true | |
930 | if hit.Parent.Parent:FindFirstChildOfClass('Humanoid') then | |
931 | hit.Parent.Parent:FindFirstChildOfClass('Humanoid').Health = 0 | |
932 | end | |
933 | wait() | |
934 | newarrow.Arrowhead.Anchored = false | |
935 | hit.Anchored = false | |
936 | killz(hit.Parent.Parent,hit.Name,newarrow.Arrowhead) | |
937 | elseif hit.Parent and hit.Parent ~= char and hit.Parent.Parent ~= char and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false then | |
938 | velocity(fly) | |
939 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
940 | newarrow.Arrowhead.CanCollide = true | |
941 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
942 | sound.SoundId = 'rbxassetid://267585646' | |
943 | sound:Play() | |
944 | end | |
945 | end) | |
946 | ||
947 | for i, v in pairs(arrow:GetChildren()) do | |
948 | v.Transparency = 1 | |
949 | end | |
950 | warrow.Part0 = char.Torso | |
951 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
952 | wait(0.5) | |
953 | for i = 0, 1, 0.05 do | |
954 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
955 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
956 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
957 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
958 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0), i) | |
959 | wait() | |
960 | end | |
961 | clarm:Remove() | |
962 | crarm:Remove() | |
963 | tors:Remove() | |
964 | rightshoulder:Clone().Parent = char.Torso | |
965 | leftshoulder:Clone().Parent = char.Torso | |
966 | torso:Clone().Parent = char.HumanoidRootPart | |
967 | checkarms() | |
968 | enabled = true | |
969 | end) |