SHOW:
|
|
- or go back to the newest paste.
1 | ----------------------------------------------------- | |
2 | name = 'Cheeseman' | |
3 | PLAYERS = game:GetService('Players') | |
4 | ply = PLAYERS.LocalPlayer | |
5 | char = ply.Character | |
6 | pcall(function() char:FindFirstChild("legetdg"):Remove() end) | |
7 | m = Instance.new("Model",char) m.Name = "legetdg" | |
8 | hop = Instance.new("HopperBin",ply.Backpack) | |
9 | hop.Name = name | |
10 | debris = game:GetService("Debris") | |
11 | cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new | |
12 | floatforce = 196.25 | |
13 | torso,head = char.Torso,char.Head | |
14 | attacking = false | |
15 | rs = torso["Right Shoulder"] | |
16 | ls = torso["Left Shoulder"] | |
17 | rh = torso["Right Hip"] | |
18 | lh = torso["Right Hip"] | |
19 | neck = torso["Neck"] | |
20 | rw,lw = nil,nil | |
21 | rhw,lhw = nil,nil | |
22 | local orgc1 = rs.C1 | |
23 | rarm = char["Right Arm"] | |
24 | larm = char["Left Arm"] | |
25 | rleg = char["Right Leg"] | |
26 | lleg = char["Left Leg"] | |
27 | normposr = cfn(1.5,.5,0) | |
28 | normposl = cfn(-1.5,.5,0) | |
29 | normposl2 = cfn(.5,-1.5,0) | |
30 | normposr2 = cfn(-.5,-1.5,0) | |
31 | normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0) | |
32 | holdpos = normposr*ang(math.pi/2,0,0) | |
33 | holdpos2 = normposl*ang(math.pi/2,0,0) | |
34 | function genNew(ClassName, Parent, Properties) | |
35 | local nObj = Instance.new(ClassName, Parent) | |
36 | if Properties["FormFactor"] then | |
37 | nObj["FormFactor"] = Properties["FormFactor"] | |
38 | end | |
39 | for Prop, Value in pairs(Properties) do | |
40 | nObj[Prop] = Value | |
41 | end | |
42 | return nObj | |
43 | end | |
44 | T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee) | |
45 | if typee == 'wedge' then | |
46 | c = Instance.new("WedgePart",m) | |
47 | elseif typee == 'seat' then | |
48 | c = Instance.new("Seat",m) | |
49 | elseif typee == 'vseat' then | |
50 | c = Instance.new("VehicleSeat",m) | |
51 | else | |
52 | c = Instance.new("Part",m) | |
53 | end | |
54 | c.TopSurface,c.BottomSurface = 0,0 | |
55 | c.Locked = true | |
56 | c.formFactor = "Custom" | |
57 | c.Size = Vector3.new(x,y,z) | |
58 | if color ~= "random" then | |
59 | c.BrickColor = BrickColor.new(color) | |
60 | else c.BrickColor = BrickColor:random() | |
61 | end | |
62 | c.Transparency = transparency | |
63 | c.CanCollide = cancollide | |
64 | if anchored ~= nil then c.Anchored = anchored end | |
65 | if parent ~= nil then c.Parent = parent end | |
66 | return c | |
67 | end | |
68 | , | |
69 | ["C"] = function(func) coroutine.resume(coroutine.create(func)) end | |
70 | , | |
71 | ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent) | |
72 | w = Instance.new("Motor",m) | |
73 | if parent ~= nil then w.Parent = parent end | |
74 | w.Part0,w.Part1 = part0,part1 | |
75 | w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz) | |
76 | return w | |
77 | end | |
78 | , | |
79 | ["BG"] = function(parent) | |
80 | local c = Instance.new("BodyGyro",parent) | |
81 | c.P = 20e+003 | |
82 | c.cframe = parent.CFrame | |
83 | c.maxTorque = Vector3.new(c.P,c.P,c.P) | |
84 | return c | |
85 | end | |
86 | , | |
87 | ["BP"] = function(parent,position) | |
88 | local bp = Instance.new("BodyPosition",parent) | |
89 | bp.maxForce = Vector3.new()*math.huge | |
90 | bp.position = position | |
91 | return bp | |
92 | end | |
93 | , | |
94 | ["F"] = function(parent,size,heat,color,secondcolor,enabled) | |
95 | f = Instance.new("Fire",parent) | |
96 | f.Size = size | |
97 | f.Heat = heat | |
98 | if enabled ~= nil then f.Enabled = enabled end | |
99 | if color ~= nil then f.Color = BrickColor.new(color).Color end | |
100 | if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end | |
101 | return f | |
102 | end | |
103 | , | |
104 | ["FM"] = function(parent,meshid,x,y,z,meshtexture) | |
105 | if meshid == "cylinder" then | |
106 | mesh = Instance.new("CylinderMesh",parent) | |
107 | mesh.Scale = Vector3.new(x,y,z) | |
108 | return mesh | |
109 | elseif meshid == 'block' then | |
110 | mesh = Instance.new("BlockMesh",parent) | |
111 | mesh.Scale = Vector3.new(x,y,z) | |
112 | return mesh | |
113 | end | |
114 | mesh = Instance.new("SpecialMesh",parent) | |
115 | if meshid == 'wedge' then | |
116 | mesh.MeshType = 'Wedge' | |
117 | elseif meshid == 'sphere' then | |
118 | mesh.MeshType = 3 | |
119 | elseif type(meshid) == "number" then | |
120 | mesh.MeshId = "rbxassetid://"..meshid | |
121 | else | |
122 | mesh.MeshId = "rbxassetid://"..meshids[meshid] | |
123 | end | |
124 | mesh.Scale = Vector3.new(x,y,z) | |
125 | if meshtexture then | |
126 | if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else | |
127 | mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end | |
128 | end | |
129 | return mesh | |
130 | end, | |
131 | ["Dec"] = function(parent,face,id,transparency) | |
132 | c = Instance.new("Decal",parent) | |
133 | c.Face = face | |
134 | c.Texture = id | |
135 | if transparency then c.Transparency = transparency end | |
136 | return c | |
137 | end, | |
138 | ["S"] = function(id,pitch,volume,parent) | |
139 | cur = nil | |
140 | found = false | |
141 | if type(id) == 'string' then | |
142 | for i,v in pairs(char.Head:children()) do | |
143 | if v:IsA("Sound") and v.Name == id and not found then | |
144 | cur = v | |
145 | if parent then cur = v:Clone() cur.Parent = parent end | |
146 | cur.Pitch = pitch | |
147 | if volume then cur.Volume = volume end | |
148 | cur:Play() | |
149 | found = true | |
150 | return cur | |
151 | end | |
152 | end | |
153 | elseif type(id) == 'number' then | |
154 | local a = char.Head:FindFirstChild('exteo') | |
155 | a.SoundId = 'rbxassetid://'..id | |
156 | a.Pitch = pitch | |
157 | if volume then a.Volume = volume end | |
158 | a:Play() | |
159 | return a | |
160 | end | |
161 | end | |
162 | } | |
163 | function spaas(position,radius,number,number2,color) | |
164 | mode = Instance.new("Model",m) | |
165 | for i = 1,number2 do | |
166 | pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
167 | mag = (position-pos).magnitude | |
168 | col = color or 'Toothpaste' | |
169 | local laz = T.P(.1,mag,.1,col,0,false,true,mode) | |
170 | T.FM(laz,'cylinder',.3,1,.3) | |
171 | laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0) | |
172 | cframe = (laz.CFrame*cfn(0,-mag/2,0)).p | |
173 | pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
174 | mag2 = (cframe-pos2).magnitude | |
175 | local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode) | |
176 | T.FM(laz2,'cylinder',.3,1,.3) | |
177 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
178 | previo = laz2 | |
179 | for i = 1,number do | |
180 | cframe = (previo.CFrame*cfn(0,-mag/2,0)).p | |
181 | pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
182 | mag2 = (cframe-pos2).magnitude | |
183 | local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode) | |
184 | T.FM(laz2,'cylinder',.3,1,.3) | |
185 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
186 | previo = laz2 | |
187 | end | |
188 | end | |
189 | debris:AddItem(mode,.1) | |
190 | end | |
191 | function lightning(startpos,endpos,times,offse,livetime,col,dmg) | |
192 | local curpos = startpos | |
193 | for i = 1,times do | |
194 | mag = (startpos-endpos).magnitude offs = {-offse,offse} | |
195 | offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)]) | |
196 | laz = T.P(.1,.1,mag/times,col,0,false,true,m) | |
197 | if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end | |
198 | apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset | |
199 | if times == i then | |
200 | mag2 = (curpos-endpos).magnitude | |
201 | laz.Size = v3n(.1,.1,mag2) | |
202 | laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2) | |
203 | else | |
204 | laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2) | |
205 | end | |
206 | curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime) | |
207 | end | |
208 | end | |
209 | ------MESHIDS--- | |
210 | meshids = {["penguin"] = 15853464, ["ring"] = 3270017, | |
211 | ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761, | |
212 | ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605, | |
213 | ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557, | |
214 | ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481, | |
215 | ["duck"] = 9419831}---some meshids | |
216 | textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153, | |
217 | ["cheese"] = 1090703} | |
218 | soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455, | |
219 | ['midas'] = 17385513; | |
220 | ['spark'] = 10756118; | |
221 | ['boom'] = 10730819; | |
222 | ['plank'] = 10548112; | |
223 | ['harmonica1'] = 33069371; | |
224 | ['harmonica2'] = 33069412; | |
225 | ['thump'] = 10730819; | |
226 | } | |
227 | for i,v in pairs(soundids) do | |
228 | for _,q in pairs(char.Head:children()) do | |
229 | if q.Name == i then q:Remove() end | |
230 | end | |
231 | end | |
232 | for i,v in pairs(soundids) do | |
233 | sound = Instance.new("Sound") | |
234 | sound.SoundId = "http://www.roblox.com/asset/?id="..v | |
235 | sound.Name = i | |
236 | sound.Parent = char.Head | |
237 | end | |
238 | M = {["R"] = function(a,b) return math.random(a,b) end, | |
239 | ["Cos"] = function(a) return math.cos(a) end, | |
240 | ["Sin"] = function(a) return math.sin(a) end, | |
241 | ["D"] = function(a) return math.rad(a) end | |
242 | } | |
243 | for i,v in pairs(char:children()) do | |
244 | if v:IsA("Hat") then v:Remove() end | |
245 | end | |
246 | hat = T.P(1,1,1,'White',0,false,false) | |
247 | T.FM(hat,57475891,1,1,1,'cheese') | |
248 | T.W(hat,char.Head,0,1,0,0,0,0) | |
249 | hat = T.P(1,1,1,'White',0,false,false) | |
250 | T.FM(hat,28165956,1.05,1,1.1,'cheese') | |
251 | T.W(hat,char.Head,0,0,0,0,0,0) | |
252 | torso.Transparency = 1 | |
253 | p = T.P(1,2,2,'Black',0,false,false,m,'wedge') p.formFactor = 'Symmetric' | |
254 | T.W(p,torso,0,0,0,-math.pi/2,0,-math.pi/2) | |
255 | p2 = T.P(1,2,2,'New Yeller',0,false,false,m,'wedge') p2.formFactor = 'Symmetric' | |
256 | T.W(p2,torso,0,0,0,math.pi/2,0,math.pi/2) | |
257 | r = .6 | |
258 | o = 55 | |
259 | for e = -.5,.5,1 do | |
260 | for i = o,180+o,40 do | |
261 | q = T.P(.1,.3,.1,'New Yeller',0,false,false) | |
262 | T.FM(q,'block',.99,1,.99) | |
263 | T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i)) | |
264 | end | |
265 | for i = o+180,360+o,40 do | |
266 | q = T.P(.1,.3,.1,'Black',0,false,false) | |
267 | T.FM(q,'block',1,1,1) | |
268 | T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i)) | |
269 | end | |
270 | end | |
271 | q = T.P(1,1,1,'White',0,false,false) | |
272 | T.W(q,lleg,0,-.8,-.3,-math.pi/2,0,0) | |
273 | T.FM(q,48880435,1,1,1,'cheese') | |
274 | q = T.P(1,1,1,'White',0,false,false) | |
275 | T.W(q,rleg,0,-.8,-.3,-math.pi/2,0,0) | |
276 | T.FM(q,48880435,1,1,1,'cheese') | |
277 | staff = T.P(.3,4,.3,'Brown',0,false,false) | |
278 | hw = T.W(staff,torso,0,0,.5,0,0,M.D(-45)) normh = hw.C1 | |
279 | ball = T.P(1,1,1,'Black',0,false,false) ball.Shape = 0 | |
280 | mot = T.W(ball,staff,0,2.45,0,0,math.pi/2,0) | |
281 | mot.C0 = cfn()*ang(0,math.pi/2,0) | |
282 | eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1) | |
283 | T.W(eye,ball,.25,.2,-.35,0,0,0) | |
284 | eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1) | |
285 | T.W(eye,ball,-.25,.2,-.35,0,0,0) | |
286 | hat = T.P(1,1,1,'New Yeller',0,false,false) | |
287 | T.FM(hat,16627529,1,1,1) | |
288 | T.W(hat,ball,0,.4,0,M.D(5),0,0) | |
289 | mot.MaxVelocity = .1 | |
290 | function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308 | |
291 | if a == nil then mot.DesiredAngle = 0 | |
292 | else mot.DesiredAngle = a | |
293 | end | |
294 | while mot.DesiredAngle ~= mot.CurrentAngle do wait() end | |
295 | mot.MaxVelocity = oldvelocity | |
296 | end | |
297 | function ventta(mot) | |
298 | while mot.DesiredAngle ~= mot.CurrentAngle do wait() end | |
299 | end | |
300 | function findplayers(a,b) | |
301 | list = {} | |
302 | for _,v in pairs(Workspace:children()) do | |
303 | if v:IsA("Model") then | |
304 | for _,child in pairs(v:children()) do | |
305 | if child:IsA("Humanoid") then | |
306 | if (a-child.Torso.Position).magnitude < b then | |
307 | table.insert(list,child.Parent) | |
308 | end | |
309 | end | |
310 | end | |
311 | end | |
312 | end | |
313 | return list | |
314 | end | |
315 | function l(a,x,y,z,b) | |
316 | if b == nil then | |
317 | return a.CFrame*cfn(x,y,z) | |
318 | else | |
319 | return a*cfn(x,y,z) | |
320 | end | |
321 | end | |
322 | function damage(hit,amount,delay) | |
323 | for i,v in pairs(hit:children()) do | |
324 | if v:IsA("Humanoid") and v.Parent ~= char then | |
325 | if delay then | |
326 | local found = v:FindFirstChild('tag') | |
327 | if not found then | |
328 | local a = Instance.new("StringValue",v) | |
329 | a.Name = 'tag' | |
330 | debris:AddItem(a,delay) | |
331 | v.Health = v.Health - amount | |
332 | end | |
333 | else v.Health = v.Health - amount | |
334 | end | |
335 | end | |
336 | end | |
337 | end | |
338 | lock = {["R"] = | |
339 | function(a) | |
340 | if a == 1 then | |
341 | rabrick = T.P(1,1,1,"White",1,false,false) | |
342 | rw = T.W(rabrick,torso,1.5,.5,0,0,0,0) | |
343 | T.W(rarm,rabrick,0,-.5,0,0,0,0) | |
344 | elseif a == 2 then | |
345 | rlbrick = T.P(1,1,1,"White",1,false,false) | |
346 | rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0) | |
347 | T.W(rleg,rlbrick,0,-.5,0,0,0,0) | |
348 | elseif a == 0 then | |
349 | rs.Parent = torso | |
350 | rw.Parent = nil | |
351 | rabrick:Destroy() rabrick = nil | |
352 | elseif a == -1 then | |
353 | rhw.Parent = nil | |
354 | rh.Parent = torso | |
355 | rlbrick:Destroy() rlbrick = nil | |
356 | end | |
357 | end | |
358 | , ["L"] = function(a) | |
359 | if a == 1 then | |
360 | labrick = T.P(1,1,1,"White",1,false,false) | |
361 | lw = T.W(labrick,torso,-1.5,.5,0,0,0,0) | |
362 | T.W(larm,labrick,0,-.5,0,0,0,0) | |
363 | elseif a == 2 then | |
364 | llbrick = T.P(1,1,1,"White",1,false,false) | |
365 | lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0) | |
366 | T.W(lleg,llbrick,0,-.5,0,0,0,0) | |
367 | elseif a == 0 then | |
368 | ls.Parent = torso | |
369 | lw.Parent = nil | |
370 | labrick:Destroy() labrick = nil | |
371 | elseif a == -1 then | |
372 | lhw.Parent = nil | |
373 | lh.Parent = torso | |
374 | llbrick:Destroy() llbrick = nil | |
375 | end | |
376 | end | |
377 | } | |
378 | function equip() | |
379 | if not equipped then | |
380 | equipped = true | |
381 | hw.Part1 = rarm | |
382 | hw.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0) | |
383 | elseif equipped then | |
384 | equipped = false | |
385 | hw.Part1 = torso | |
386 | hw.C1 = cfn(0,0,.5)*ang(0,0,M.D(-45)) | |
387 | end | |
388 | normh = hw.C1 | |
389 | end | |
390 | mag = _ | |
391 | function findground(position) | |
392 | local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*200) | |
393 | local obj,pos2 = Workspace:FindPartOnRay(ray,m) | |
394 | if obj and pos2 then return obj,pos2 else return nil end | |
395 | end | |
396 | function attack() | |
397 | lock.R(1) | |
398 | for i = 0,1,.1 do | |
399 | rw.C1 = normposr*ang(M.D(90*i),0,0) | |
400 | hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0) | |
401 | wait() | |
402 | end | |
403 | mot.DesiredAngle = math.pi/2 | |
404 | ventta(mot) | |
405 | cannon = T.P(.3,.1,.3,'White',0,false,false) | |
406 | T.FM(cannon,'cylinder',1,1,1) | |
407 | wld = T.W(cannon,ball,0,-.2,-.5,math.pi/2,0,0) | |
408 | for i = 0,1,.1 do | |
409 | cannon.Size = v3n(.3,2*i,.3) | |
410 | wld.Parent,wld.Part1 = m,ball | |
411 | wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0) | |
412 | wait() | |
413 | end | |
414 | local bullet = T.P(1,1,1,'New Yeller',0,true,true) T.FM(bullet,'sphere',1,1,1) | |
415 | bullet.CFrame = cannon.CFrame*cfn(0,-2,0) | |
416 | local ray = Ray.new(cannon.Position,cannon.Position+torso.CFrame.lookVector*50) | |
417 | local obj,pos = Workspace:FindPartOnRay(ray,m) | |
418 | if obj and pos then mag = (cannon.Position-pos).magnitude else mag = 50 end | |
419 | cf = cannon.CFrame*cfn(0,-2,0) | |
420 | T.C(function() | |
421 | while bullet.Parent ~= nil do | |
422 | local obj,pos2 = findground(bullet.CFrame) | |
423 | if pos2 then | |
424 | T.C(function() | |
425 | local ef = T.P(1,1,1,'Magenta',0,false,true) | |
426 | ef.CFrame = cfn(pos2) | |
427 | local msh = T.FM(ef,'crown',1,1,1) | |
428 | for i = 1,10 do | |
429 | msh.Scale = v3n(i,1,i) | |
430 | ef.Transparency = i/10 | |
431 | wait() | |
432 | end | |
433 | ef:Remove() | |
434 | end) | |
435 | end | |
436 | wait(.1) | |
437 | end | |
438 | end) | |
439 | T.C(function() | |
440 | for i = 0,mag,1 do | |
441 | bullet.CFrame = cf*cfn(0,-i,0) | |
442 | wait() | |
443 | end | |
444 | local p = T.P(1,1,1,'Black',0,false,true) | |
445 | p.CFrame = bullet.CFrame | |
446 | bullet:Remove() | |
447 | local msh = T.FM(p,'sphere',1,1,1) | |
448 | ring = T.P(1,1,1,'Black',0,false,true) | |
449 | ring.CFrame = p.CFrame | |
450 | ringm = T.FM(ring,'ring',1,1,1) | |
451 | local sw = T.P(1,1,1,'New Yeller',1,false,true) | |
452 | sw.CFrame = p.CFrame | |
453 | ground,groundp = findground(p.CFrame) | |
454 | if ground then | |
455 | for i = 1,5 do | |
456 | p2 = T.P(20,1,20,ground.BrickColor.Name,ground.Transparency,true,true) | |
457 | p2.TopSurface,p2.BottomSurface = ground.TopSurface,ground.BottomSurface | |
458 | p2.CFrame = cfn(groundp)*cfn(0,-1,0)*ang(M.D(M.R(-20,20)),M.D(M.R(-20,20)),M.D(M.R(-20,20))) | |
459 | end | |
460 | end | |
461 | for i = 0,1,.05 do | |
462 | msh.Scale = v3n(60*i,60*i,60*i) | |
463 | ringm.Scale = v3n(60*i,60*i,0) | |
464 | ring.CFrame = p.CFrame*ang(M.D(360*i),0,0) | |
465 | ring.Transparency = i | |
466 | p.Transparency = i | |
467 | wait() | |
468 | end | |
469 | ring:Remove() | |
470 | p:Remove() | |
471 | end) | |
472 | for i = 1,0,-.1 do | |
473 | rw.C1 = normposr*ang(M.D(90*i),0,0) | |
474 | hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0) | |
475 | cannon.Size = v3n(.3,2*i,.3) | |
476 | wld.Parent,wld.Part1 = m,ball | |
477 | wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0) | |
478 | wait() | |
479 | end | |
480 | cannon:Remove() | |
481 | lock.R(0) | |
482 | end | |
483 | function lasso(mouse) | |
484 | bg = T.BG(head) cf = bg.cframe | |
485 | lock.L(1) lock.R(1) | |
486 | rw.C1 = normposr*ang(0,0,M.D(10)) | |
487 | lw.C1 = normposl*ang(0,0,-math.pi/2) | |
488 | cheese = T.P(1,1,1,'White',0,true,false) | |
489 | wld = T.W(cheese,larm,0,-1,0,0,0,0) | |
490 | T.FM(cheese,'cheese',1,1,1,'cheese').VertexColor = v3n(.1,.5,0) | |
491 | holding = true | |
492 | while holding do wait() bg.cframe = cfn(head.Position,v3n(mouse.hit.p.x,char.Head.Position.y,mouse.hit.p.z))*ang(0,-math.pi/2,0) end | |
493 | wld:Remove() | |
494 | cf = (larm.CFrame*cfn(0,-4,0)) | |
495 | cheese.CFrame = cf | |
496 | genNew('Smoke',cheese,{ | |
497 | Color = Color3.new(0,.5,0); | |
498 | Size = 1; | |
499 | RiseVelocity = 10; | |
500 | }) | |
501 | debris:AddItem(cheese,3) | |
502 | Instance.new("BodyForce",cheese).force = cfn(cf.p,(cf*cfn(0,-4,0)).p).lookVector*100 + v3n(0,cheese:GetMass()+floatforce,0) | |
503 | lw.C1 = normposl*ang(0,0,M.D(-120)) | |
504 | wait(.1) | |
505 | lw.C1 = normposl*ang(0,0,-math.pi/2) | |
506 | bg:Remove() | |
507 | lock.L(0) lock.R(0) | |
508 | end | |
509 | hum = char.Humanoid | |
510 | restbp = nil | |
511 | restbg = nil | |
512 | function rest() | |
513 | if not restbp then | |
514 | lock.R(1) lock.L(1) lock.R(2) lock.L(2) | |
515 | tyu = cfn(.2,.2,-.2) | |
516 | tyu1 = cfn(-.2,.2,-.2) | |
517 | tyu2 = cfn(-.1,.2,-.2) | |
518 | rw.C1 = (holdpos*tyu1)*ang(M.D(100),0,M.D(-30)) | |
519 | lw.C1 = (holdpos2*tyu)*ang(M.D(100),0,M.D(30)) | |
520 | neck.C0 = normposn*ang(M.D(20),0,0) | |
521 | lhw.C1 = (normposl2*tyu2)*ang(M.D(20),0,M.D(-20)) | |
522 | rhw.C1 = (normposr2)*ang(M.D(5),0,M.D(10)) | |
523 | pos = torso.CFrame | |
524 | restbp = T.BP(torso,pos.p) | |
525 | cloud = T.P(5,2,5,'White',0,false,false) T.FM(cloud,'cheese',6,2,6,'cheese').VertexColor = v3n(1,1,0) | |
526 | cloud.Position = pos.p | |
527 | T.W(cloud,torso,0,1,.8,-math.pi/2,M.D(-22.5),0) | |
528 | T.C(function() | |
529 | while wait() do | |
530 | for i = 0,.5,.05 do | |
531 | restbp.position = pos.p+v3n(0,i,0) | |
532 | wait(.2) | |
533 | end | |
534 | for i = .5,0,-.05 do | |
535 | restbp.position = pos.p+v3n(0,i,0) | |
536 | wait(.2) | |
537 | end | |
538 | end | |
539 | end) | |
540 | restbg = T.BG(torso) | |
541 | restbg.cframe = pos*ang(math.pi/2,0,0) | |
542 | hum.PlatformStand = true | |
543 | else | |
544 | hum.PlatformStand = false | |
545 | for i = -1,0 do lock.R(i) lock.L(i) end | |
546 | cloud:Remove() | |
547 | restbp:Remove() | |
548 | restbg:Remove() | |
549 | neck.C0 = normposn | |
550 | torso.CFrame = pos | |
551 | restbp,restbg = nil,nil | |
552 | end | |
553 | end | |
554 | function dance() | |
555 | lock.R(1) lock.L(1) lock.R(2) lock.L(2) | |
556 | for _ = 0,3 do | |
557 | for i = 0,1,.2 do | |
558 | lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i)) | |
559 | rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i)) | |
560 | lw.C1 = holdpos2*ang(0,0,M.D(50*-i)) | |
561 | rw.C1 = holdpos*ang(0,0,M.D(50*-i)) | |
562 | neck.C0 = normposn*ang(M.D(30*i),0,0) | |
563 | wait() | |
564 | end | |
565 | for i = 1,-1,-.2 do | |
566 | lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i)) | |
567 | rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i)) | |
568 | lw.C1 = holdpos2*ang(0,0,M.D(50*-i)) | |
569 | rw.C1 = holdpos*ang(0,0,M.D(50*-i)) | |
570 | neck.C0 = normposn*ang(M.D(30*i),0,0) | |
571 | wait() | |
572 | end | |
573 | for i = -1,0,.2 do | |
574 | lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i)) | |
575 | rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i)) | |
576 | lw.C1 = holdpos2*ang(0,0,M.D(50*-i)) | |
577 | rw.C1 = holdpos*ang(0,0,M.D(50*-i)) | |
578 | neck.C0 = normposn*ang(M.D(30*i),0,0) | |
579 | wait() | |
580 | end | |
581 | end | |
582 | lock.R(0) lock.L(0) lock.R(-1) lock.L(-1) | |
583 | end | |
584 | levbg = nil | |
585 | function levitate() | |
586 | if not levbp then | |
587 | levbp = T.BP(torso,torso.Position) | |
588 | else levbp:Remove() levbp = nil | |
589 | end | |
590 | end | |
591 | function test() | |
592 | lock.R(1) | |
593 | for i = 0,1,.1 do | |
594 | wait() | |
595 | rw.C1 = holdpos*ang(0,0,M.D(45+90*i)) | |
596 | end | |
597 | for i = 1,0,-.1 do | |
598 | wait() | |
599 | rw.C1 = holdpos*ang(0,0,M.D(45+90*i)) | |
600 | end | |
601 | lock.R(0) | |
602 | end | |
603 | function fly(mouse) | |
604 | levbg = T.BG(torso) | |
605 | holding = true | |
606 | lock.R(1) lock.L(1) | |
607 | T.C(function() | |
608 | while holding do | |
609 | for i = 0,1,.1 do | |
610 | wait() | |
611 | rw.C1 = holdpos*ang(0,0,M.D(45+90*i)) | |
612 | lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i)) | |
613 | end | |
614 | for i = 1,0,-.1 do | |
615 | wait() | |
616 | rw.C1 = holdpos*ang(0,0,M.D(45+90*i)) | |
617 | lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i)) | |
618 | end | |
619 | end | |
620 | end) | |
621 | while holding do | |
622 | ches = T.P(1,1,1,'White',0,true,false) | |
623 | T.FM(ches,'cheese',1,1,1,'cheese') | |
624 | debris:AddItem(ches,1) | |
625 | Instance.new("Sparkles",ches) | |
626 | ches.CFrame = torso.CFrame*cfn(0,-3,0) | |
627 | levbg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0) | |
628 | levbp.position = torso.Position + (torso.Position-mouse.hit.p).unit*-10 | |
629 | wait() | |
630 | end | |
631 | lock.R(0) lock.L(0) | |
632 | levbg:Remove() levbg = nil | |
633 | end | |
634 | function sel(mouse) | |
635 | if levbp then | |
636 | fly(mouse) | |
637 | elseif equipped then attack() | |
638 | else | |
639 | lasso(mouse) | |
640 | end | |
641 | end | |
642 | klist = { | |
643 | {'c',function() rest() end}; | |
644 | {'f',function() dance() end}; | |
645 | {'q',function() levitate() end}; | |
646 | {'r',function() equip() end}; | |
647 | } | |
648 | hop.Deselected:connect(function() lock.R(0) lock.L(0) end) | |
649 | hop.Selected:connect(function(mouse) | |
650 | mouse.Button1Up:connect(function() holding = false end) | |
651 | mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end) | |
652 | mouse.KeyDown:connect(function(key) | |
653 | if attacking then return end | |
654 | for i,v in pairs(klist) do | |
655 | if key == v[1] then attacking = true v[2](mouse) attacking = false end | |
656 | end | |
657 | end) | |
658 | mouse.Button1Down:connect(function() if attacking then return end attacking = true sel(mouse) attacking = false end) | |
659 | end) |