SHOW:
|
|
- or go back to the newest paste.
1 | - | owner,name = 'XTheShowcaserX','Polearm' |
1 | + | owner,name = 'rickyro26','Polearm' |
2 | PLAYERS = game:GetService('Players') | |
3 | ply = PLAYERS[owner] | |
4 | char = ply.Character | |
5 | terrain = Workspace.Terrain | |
6 | pcall(function() char:FindFirstChild("legetdg"):Remove() end) | |
7 | m = Instance.new("Model",char) m.Name = "legetdg" | |
8 | if script.Parent.className ~= 'HopperBin' then | |
9 | hop = Instance.new("HopperBin",PLAYERS[owner].Backpack) | |
10 | hop.Name = name | |
11 | script.Parent = hop | |
12 | script.Name = "Function" | |
13 | end | |
14 | owner2 = owner | |
15 | hop = script.Parent | |
16 | ||
17 | debris = game:GetService("Debris") | |
18 | ||
19 | cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new | |
20 | floatforce = 196.25 | |
21 | ||
22 | torso,head = char.Torso,char.Head | |
23 | attacking = false | |
24 | track = false | |
25 | ||
26 | rs = torso["Right Shoulder"] | |
27 | ls = torso["Left Shoulder"] | |
28 | rh = torso["Right Hip"] | |
29 | lh = torso["Right Hip"] | |
30 | neck = torso["Neck"] | |
31 | rw,lw = nil,nil | |
32 | rhw,lhw = nil,nil | |
33 | local orgc1 = rs.C1 | |
34 | ||
35 | rarm = char["Right Arm"] | |
36 | larm = char["Left Arm"] | |
37 | rleg = char["Right Leg"] | |
38 | lleg = char["Left Leg"] | |
39 | ||
40 | normposr = cfn(1.5,.5,0) | |
41 | normposl = cfn(-1.5,.5,0) | |
42 | normposl2 = cfn(.5,-1.5,0) | |
43 | normposr2 = cfn(-.5,-1.5,0) | |
44 | normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0) | |
45 | ||
46 | holdpos = normposr*ang(math.pi/2,0,0) | |
47 | holdpos2 = normposl*ang(math.pi/2,0,0) | |
48 | ||
49 | ||
50 | T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee) | |
51 | if typee == 'wedge' then | |
52 | c = Instance.new("WedgePart",m) | |
53 | elseif typee == 'seat' then | |
54 | c = Instance.new("Seat",m) | |
55 | elseif typee == 'vseat' then | |
56 | c = Instance.new("VehicleSeat",m) | |
57 | else | |
58 | c = Instance.new("Part",m) | |
59 | end | |
60 | c.TopSurface,c.BottomSurface = 0,0 | |
61 | c.Locked = true | |
62 | c.formFactor = "Custom" | |
63 | c.Size = Vector3.new(x,y,z) | |
64 | if color ~= "random" then | |
65 | c.BrickColor = BrickColor.new(color) | |
66 | else c.BrickColor = BrickColor:random() | |
67 | end | |
68 | c.Transparency = transparency | |
69 | c.CanCollide = cancollide | |
70 | if anchored ~= nil then c.Anchored = anchored end | |
71 | if parent ~= nil then c.Parent = parent end | |
72 | return c | |
73 | end | |
74 | , | |
75 | ["C"] = function(func) coroutine.resume(coroutine.create(func)) end | |
76 | , | |
77 | ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent) | |
78 | w = Instance.new("Motor",m) | |
79 | if parent ~= nil then w.Parent = parent end | |
80 | w.Part0,w.Part1 = part0,part1 | |
81 | w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz) | |
82 | return w | |
83 | end | |
84 | , | |
85 | ["BG"] = function(parent) | |
86 | local c = Instance.new("BodyGyro",parent) | |
87 | c.P = 20e+003 | |
88 | c.cframe = parent.CFrame | |
89 | c.maxTorque = Vector3.new(c.P,c.P,c.P) | |
90 | return c | |
91 | end | |
92 | , | |
93 | ["BP"] = function(parent,position) | |
94 | local bp = Instance.new("BodyPosition",parent) | |
95 | bp.maxForce = Vector3.new()*math.huge | |
96 | bp.position = position | |
97 | return bp | |
98 | end | |
99 | , | |
100 | ["F"] = function(parent,size,heat,color,secondcolor,enabled) | |
101 | f = Instance.new("Fire",parent) | |
102 | f.Size = size | |
103 | f.Heat = heat | |
104 | if enabled ~= nil then f.Enabled = enabled end | |
105 | if color ~= nil then f.Color = BrickColor.new(color).Color end | |
106 | if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end | |
107 | return f | |
108 | end | |
109 | , | |
110 | ||
111 | ["FM"] = function(parent,meshid,x,y,z,meshtexture) | |
112 | if meshid == "cylinder" then | |
113 | mesh = Instance.new("CylinderMesh",parent) | |
114 | mesh.Scale = Vector3.new(x,y,z) | |
115 | return mesh | |
116 | elseif meshid == 'block' then | |
117 | mesh = Instance.new("BlockMesh",parent) | |
118 | mesh.Scale = Vector3.new(x,y,z) | |
119 | return mesh | |
120 | end | |
121 | mesh = Instance.new("SpecialMesh",parent) | |
122 | ||
123 | if meshid == 'wedge' then | |
124 | mesh.MeshType = 'Wedge' | |
125 | elseif meshid == 'sphere' then | |
126 | mesh.MeshType = 3 | |
127 | elseif type(meshid) == "number" then | |
128 | mesh.MeshId = "rbxassetid://"..meshid | |
129 | else | |
130 | mesh.MeshId = "rbxassetid://"..meshids[meshid] | |
131 | end | |
132 | mesh.Scale = Vector3.new(x,y,z) | |
133 | if meshtexture then | |
134 | if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else | |
135 | mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end | |
136 | end | |
137 | return mesh | |
138 | end, | |
139 | ||
140 | ["Dec"] = function(parent,face,id,transparency) | |
141 | c = Instance.new("Decal",parent) | |
142 | c.Face = face | |
143 | c.Texture = id | |
144 | if transparency then c.Transparency = transparency end | |
145 | return c | |
146 | end, | |
147 | ["S"] = function(id,pitch,volume,parent) | |
148 | cur = nil | |
149 | found = false | |
150 | if type(id) == 'string' then | |
151 | for i,v in pairs(char.Head:children()) do | |
152 | if v:IsA("Sound") and v.Name == id and not found then | |
153 | cur = v | |
154 | if parent then cur = v:Clone() cur.Parent = parent end | |
155 | cur.Pitch = pitch | |
156 | if volume then cur.Volume = volume end | |
157 | cur:Play() | |
158 | found = true | |
159 | return cur | |
160 | end | |
161 | end | |
162 | elseif type(id) == 'number' then | |
163 | local a = char.Head:FindFirstChild('exteo') | |
164 | a.SoundId = 'rbxassetid://'..id | |
165 | a.Pitch = pitch | |
166 | if volume then a.Volume = volume end | |
167 | a:Play() | |
168 | return a | |
169 | end | |
170 | end | |
171 | } | |
172 | ----GUI SHORTENINGS----- | |
173 | G = { | |
174 | ["F"] = function(parent,size,position) | |
175 | c = Instance.new("Frame",parent) | |
176 | c.Size = UDim2.new(size.x,0,size.y,0) | |
177 | c.Style = 2 | |
178 | c.Position = UDim2.new(position.x,0,position.y,0) | |
179 | return c | |
180 | end, | |
181 | ["B"] = function(parent,size,position,text,...) | |
182 | c = Instance.new("TextButton",parent) | |
183 | c.Size = UDim2.new(size.x,0,size.y,0) | |
184 | c.Position = UDim2.new(position.x,0,position.y,0) | |
185 | c.AutoButtonColor = true | |
186 | c.Text = text | |
187 | return c | |
188 | end, | |
189 | ["L"] = function(parent,size,position,text) | |
190 | c = Instance.new("TextLabel",parent) | |
191 | c.Size = UDim2.new(size.x,0,size.y,0) | |
192 | c.Position = UDim2.new(position.x,0,position.y,0) | |
193 | if text then c.Text = text end | |
194 | return c | |
195 | end | |
196 | } | |
197 | ----GUI SHORTENINGS----- | |
198 | ------MESHIDS--- | |
199 | meshids = {["penguin"] = 15853464, ["ring"] = 3270017, | |
200 | ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761, | |
201 | ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605, | |
202 | ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557, | |
203 | ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549}---some meshids | |
204 | textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153} | |
205 | soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455, | |
206 | ['midas'] = 17385513,['spark'] = 10756118,['boom'] = 10730819,['plank'] = 10548112 | |
207 | } | |
208 | for i,v in pairs(soundids) do | |
209 | sound = Instance.new("Sound") | |
210 | sound.SoundId = "http://www.roblox.com/asset/?id="..v | |
211 | sound.Name = i | |
212 | sound.Parent = char.Head | |
213 | end | |
214 | ||
215 | function l(a,x,y,z,b) | |
216 | if b == nil then | |
217 | return a.CFrame*cfn(x,y,z) | |
218 | else | |
219 | return a*cfn(x,y,z) | |
220 | end | |
221 | end | |
222 | ||
223 | ||
224 | lock = {["R"] = | |
225 | function(a) | |
226 | if a == 1 then | |
227 | rabrick = T.P(1,1,1,"White",1,false,false) | |
228 | rw = T.W(rabrick,torso,1.5,.5,0,0,0,0) | |
229 | T.W(rarm,rabrick,0,-.5,0,0,0,0) | |
230 | elseif a == 2 then | |
231 | rlbrick = T.P(1,1,1,"White",1,false,false) | |
232 | rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0) | |
233 | T.W(rleg,rlbrick,0,-.5,0,0,0,0) | |
234 | elseif a == 0 then | |
235 | rs.Parent = torso | |
236 | rw.Parent = nil | |
237 | rabrick:Destroy() rabrick = nil | |
238 | elseif a == -1 then | |
239 | rhw.Parent = nil | |
240 | rh.Parent = torso | |
241 | rlbrick:Destroy() rlbrick = nil | |
242 | end | |
243 | end | |
244 | , ["L"] = function(a) | |
245 | if a == 1 then | |
246 | labrick = T.P(1,1,1,"White",1,false,false) | |
247 | lw = T.W(labrick,torso,-1.5,.5,0,0,0,0) | |
248 | T.W(larm,labrick,0,-.5,0,0,0,0) | |
249 | elseif a == 2 then | |
250 | llbrick = T.P(1,1,1,"White",1,false,false) | |
251 | lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0) | |
252 | T.W(lleg,llbrick,0,-.5,0,0,0,0) | |
253 | elseif a == 0 then | |
254 | ls.Parent = torso | |
255 | lw.Parent = nil | |
256 | labrick:Destroy() labrick = nil | |
257 | elseif a == -1 then | |
258 | lhw.Parent = nil | |
259 | lh.Parent = torso | |
260 | llbrick:Destroy() llbrick = nil | |
261 | end | |
262 | end | |
263 | } | |
264 | ||
265 | M = {["R"] = function(a,b) return math.random(a,b) end, | |
266 | ["Cos"] = function(a) return math.cos(a) end, | |
267 | ["Sin"] = function(a) return math.sin(a) end, | |
268 | ["D"] = function(a) return math.rad(a) end | |
269 | } | |
270 | ||
271 | hdl = T.P(.25,4,.25,'Brown',0,false,false) | |
272 | hw = T.W(hdl,rarm,0,-1,0,-math.pi/2,0,0) normh = hw.C1 | |
273 | --[[ | |
274 | p = T.P(.1,2,.3,'Bright green',0,false,false,m,'wedge') | |
275 | T.W(p,hdl,0,2.95,0,0,math.pi,0) | |
276 | ||
277 | p2 = T.P(.1,1,1,'Bright green',0,false,false,m,'wedge') | |
278 | T.W(p2,p,0,.5,.65,math.pi/2,0,0) | |
279 | ||
280 | p3 = T.P(.1,1,.5,'Bright green',0,false,false,m,'wedge') | |
281 | T.W(p3,p2,0,.25,1,math.pi/2,0,0) | |
282 | ]]-- | |
283 | ||
284 | function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308 | |
285 | if a == nil then mot.DesiredAngle = 0 | |
286 | else mot.DesiredAngle = a | |
287 | end | |
288 | while mot.DesiredAngle ~= mot.CurrentAngle do wait() end | |
289 | mot.MaxVelocity = oldvelocity | |
290 | end | |
291 | function ventta(mot) | |
292 | while mot.DesiredAngle ~= mot.CurrentAngle do wait() end | |
293 | end | |
294 | ||
295 | function damage(hit,amount,bool) | |
296 | for i,v in pairs(hit:children()) do | |
297 | if v:IsA("Humanoid") and v.Parent ~= char then | |
298 | if bool then | |
299 | local found = v:FindFirstChild('lol') | |
300 | if not found then | |
301 | bo = Instance.new("StringValue",v) | |
302 | bo.Name = 'lol' | |
303 | debris:AddItem(bo,bool) | |
304 | v.Health = v.Health-amount | |
305 | end | |
306 | else | |
307 | v.Health = v.Health-amount | |
308 | end | |
309 | end | |
310 | end | |
311 | end | |
312 | ||
313 | T.C(function() | |
314 | while wait() do | |
315 | wld.DesiredAngle = math.pi | |
316 | ventta(wld) | |
317 | zeero(wld,0) | |
318 | end | |
319 | end) | |
320 | ||
321 | function spaas(position,radius,number,number2,color) | |
322 | mode = Instance.new("Model",m) | |
323 | for i = 1,number2 do | |
324 | pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
325 | mag = (position-pos).magnitude | |
326 | ||
327 | col = color or 'Toothpaste' | |
328 | local laz = T.P(.1,mag,.1,col,0,false,true,mode) | |
329 | ||
330 | T.FM(laz,'cylinder',.3,1,.3) | |
331 | laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0) | |
332 | ||
333 | cframe = (laz.CFrame*cfn(0,-mag/2,0)).p | |
334 | pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
335 | mag2 = (cframe-pos2).magnitude | |
336 | local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode) | |
337 | T.FM(laz2,'cylinder',.3,1,.3) | |
338 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
339 | ||
340 | previo = laz2 | |
341 | for i = 1,number do | |
342 | cframe = (previo.CFrame*cfn(0,-mag/2,0)).p | |
343 | pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius)) | |
344 | mag2 = (cframe-pos2).magnitude | |
345 | ||
346 | local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode) | |
347 | T.FM(laz2,'cylinder',.3,1,.3) | |
348 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
349 | ||
350 | previo = laz2 | |
351 | end | |
352 | ||
353 | end | |
354 | debris:AddItem(mode,.1) | |
355 | end | |
356 | ||
357 | ||
358 | pp = T.P(.1,.1,.1,'Black',0,false,false) | |
359 | T.FM(pp,'sphere',1,1,1) | |
360 | ||
361 | wld = T.W(pp,hdl,0,2.5,0,-math.pi/2,0,0) | |
362 | wld.C0 = cfn()*ang(0,0,0,math.pi/2,0,0) | |
363 | wld.MaxVelocity = .1 | |
364 | ||
365 | for _ = 1,1 do --- WEAPON LOOP | |
366 | decor = Instance.new("Model",m) | |
367 | for i = -45,45,90 do | |
368 | wait() | |
369 | print('a') | |
370 | p = T.P(.1,.1,.1,'Black',1,false,false,decor) | |
371 | T.W(p,pp,0,0,0,0,0,M.D(i)) | |
372 | T.FM(p,'sphere',1,1,1) | |
373 | r = .3 | |
374 | for i = 0,360,30 do | |
375 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,false,decor) | |
376 | T.FM(p2,'block',.9,.25,.45) | |
377 | T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i)) | |
378 | p3 = T.P(.1,.1,.1,'Deep blue',0,false,false,decor) | |
379 | T.FM(p3,'block',.25,.5,.45) | |
380 | T.W(p3,p2,0,-.05,0,0,0,0) | |
381 | end | |
382 | r = .2 | |
383 | for i = 0,360,30 do | |
384 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,false,decor) | |
385 | T.FM(p2,'block',.6,.25,.45) | |
386 | T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i)) | |
387 | end | |
388 | r = .35 | |
389 | for i = 0,360,120 do | |
390 | p2 = T.P(2,.1,.1,'Deep blue',0,false,false,decor) | |
391 | T.FM(p2,'block',.6,.25,.45) | |
392 | T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i)) | |
393 | end | |
394 | for i = 60,360+60,120 do | |
395 | p2 = T.P(2,.1,.1,'Deep blue',0,false,false,decor) | |
396 | T.FM(p2,'block',.62,.25,.45) | |
397 | T.W(p2,p,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r,math.pi/2,0,-math.pi/2+M.D(i)) | |
398 | end | |
399 | p4 = T.P(.4,.1,.4,'Lime green',.5,false,false,decor) | |
400 | T.FM(p4,'cylinder',.9,.45,.9) | |
401 | T.W(p4,p,0,0,0,0,0,0) | |
402 | end | |
403 | end | |
404 | ||
405 | center = _ | |
406 | troll_loop = false | |
407 | ||
408 | ||
409 | function star(mouse) | |
410 | ou = 20 | |
411 | th = 1 | |
412 | wi = 3 | |
413 | centers = {} | |
414 | ||
415 | for _ = 1,1 do ----- CENTER LOOP | |
416 | pos = cfn(mouse.hit.p)+v3n(0,.1,0) oripos = pos | |
417 | main = T.P(1,1,1,'White',1,true,true) | |
418 | main.CFrame = pos | |
419 | center = main | |
420 | ||
421 | r = .3*ou | |
422 | for i = 0,360,30 do ---- INNER RING | |
423 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor) | |
424 | T.FM(p2,'block',.9*ou,wi,th) | |
425 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
426 | ||
427 | p3 = T.P(.1,.1,.1,'Deep blue',0,false,true,decor) | |
428 | T.FM(p3,'block',wi,.5*ou,th) | |
429 | p3.CFrame = l(p2,0,-.05*ou,0) | |
430 | end | |
431 | ||
432 | r = .2*ou | |
433 | for i = 0,360,30 do ---OUTER RING | |
434 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor) | |
435 | T.FM(p2,'block',.6*ou,wi,th) | |
436 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
437 | end | |
438 | ||
439 | r = .35*ou | |
440 | for q = 0,60,60 do ----TRIANGLES | |
441 | for i = q,360+q,120 do | |
442 | p2 = T.P(2,.1,.1,'Deep blue',0,false,true,decor) | |
443 | T.FM(p2,'block',.6*ou,wi,th) | |
444 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
445 | end | |
446 | end | |
447 | ---------------- | |
448 | p4 = T.P(.4,.1,.4,'Lime green',.5,false,false,decor) --- EYE | |
449 | T.FM(p4,'cylinder',.9*(ou*1.15),.45,.9*(ou*1.15)) | |
450 | T.W(p4,main,0,0,0,0,0,0) | |
451 | ----------------------- | |
452 | end | |
453 | ||
454 | ou = 10 | |
455 | wi = 2 | |
456 | ||
457 | for i = 90,360+90,60 do --- MAIN LOOP | |
458 | pos = cfn(mouse.hit.p)+v3n(M.Cos(M.D(i))*18,.1,M.Sin(M.D(i))*18) | |
459 | main = T.P(1,1,1,'White',1,true,true) | |
460 | main.CFrame = pos | |
461 | ||
462 | r = .3*ou | |
463 | for i = 0,360,30 do ---- INNER RING | |
464 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor) | |
465 | T.FM(p2,'block',.9*ou,wi,th) | |
466 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
467 | ||
468 | p3 = T.P(.1,.1,.1,'Deep blue',0,false,true,decor) | |
469 | T.FM(p3,'block',wi,.5*ou,th) | |
470 | p3.CFrame = l(p2,0,-.05*ou,0) | |
471 | end | |
472 | ||
473 | r = .2*ou | |
474 | for i = 0,360,30 do ---OUTER RING | |
475 | p2 = T.P(.2,.1,.1,'Deep blue',0,false,true,decor) | |
476 | T.FM(p2,'block',.6*ou,wi,th) | |
477 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
478 | end | |
479 | ||
480 | r = .35*ou | |
481 | for q = 0,60,60 do ----TRIANGLES | |
482 | triangle = {} | |
483 | for i = q+60,360+q,120 do | |
484 | p2 = T.P(2,.1,.1,'Deep blue',0,false,true,decor) | |
485 | T.FM(p2,'block',.6*ou,wi,th) | |
486 | p2.CFrame = l(main,M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)*ang(math.pi/2,0,-math.pi/2+M.D(i)) | |
487 | end | |
488 | end | |
489 | p4 = T.P(.4,.1,.4,'Lime green',.5,false,true,decor) --- EYE | |
490 | T.FM(p4,'cylinder',.9*(ou*1.15),.45,.9*(ou*1.15)) | |
491 | p4.CFrame = main.CFrame | |
492 | table.insert(centers,p4) | |
493 | end ---- MAIN LOOP END | |
494 | ||
495 | T.C(function() ---- TROLL LOOP | |
496 | while wait() do | |
497 | if troll_loop == true then | |
498 | rand = M.R(0,1) | |
499 | tex = rand>0 and 'http://www.roblox.com/asset/?id=34697344' or 'http://www.roblox.com/asset/?id=78298767' | |
500 | local sel = centers[math.random(#centers)] | |
501 | local pole = T.P(2,1,2,'White',0,true,true) | |
502 | T.FM(pole,'cylinder',1,1,1) | |
503 | pole.CFrame = cfn(sel.Position) | |
504 | local ball = T.P(4,4,4,'Nougat',0,true,true) ball.Shape = 0 | |
505 | local pos = pole.CFrame | |
506 | for _,v in pairs({'Front','Back','Left','Right'}) do | |
507 | T.Dec(ball,v,tex) | |
508 | end | |
509 | for i = 1,5,5/3 do | |
510 | pole.Size = v3n(2,i,2) | |
511 | pole.CFrame = pos+v3n(0,i/2,0) | |
512 | ball.CFrame = pole.CFrame*cfn(0,i/2+1.95,0) | |
513 | wait() | |
514 | end | |
515 | for i = 5,1,-5/3 do | |
516 | pole.Size = v3n(2,i,2) | |
517 | pole.CFrame = pos+v3n(0,i/2,0) | |
518 | ball.CFrame = pole.CFrame*cfn(0,i/2+1.95,0) | |
519 | wait() | |
520 | end | |
521 | pole:Remove() ball:Remove() | |
522 | end | |
523 | end | |
524 | end) | |
525 | T.C(function() ---- GIANT TROLL LOOP | |
526 | while wait(1) do | |
527 | if troll_loop == true then | |
528 | pole = T.P(5,1,5,'White',0,true,true) | |
529 | pole.CFrame = cfn(center.Position) | |
530 | local ball = T.P(10,10,10,'Nougat',0,true,true) ball.Shape = 0 | |
531 | local pos = pole.CFrame | |
532 | T.FM(pole,'cylinder',1,1,1) | |
533 | ||
534 | for _,v in pairs({'Front','Back','Left','Right'}) do | |
535 | T.Dec(ball,v,'http://www.roblox.com/asset/?id=34697344') | |
536 | end | |
537 | for i = 1,30 do | |
538 | pole.Size = v3n(5,i,5) | |
539 | pole.CFrame = pos+v3n(0,i/2,0) | |
540 | ball.CFrame = pole.CFrame*cfn(0,i/2+4.95,0) | |
541 | wait() | |
542 | end | |
543 | for i = 30,1,-1 do | |
544 | pole.Size = v3n(5,i,5) | |
545 | pole.CFrame = pos+v3n(0,i/2,0) | |
546 | ball.CFrame = pole.CFrame*cfn(0,i/2+4.95,0) | |
547 | wait() | |
548 | end | |
549 | pole:Remove() ball:Remove() | |
550 | end | |
551 | ||
552 | end | |
553 | end) | |
554 | ||
555 | end --- FUNCTION END | |
556 | ||
557 | function spark(mouse) | |
558 | if cannon then return end | |
559 | lock.R(1) | |
560 | for i = 0,1,.1 do | |
561 | wait() | |
562 | rw.C1 = normposr*ang(M.D(120*i),0,M.D(20*i)) | |
563 | hw.C1 = normh*ang(0,0,M.D(90*i)) | |
564 | end | |
565 | holding = true | |
566 | laz = T.P(.1,.1,.1,'Lime green',.5,false,true) | |
567 | T.FM(laz,'cylinder',1,1,1) | |
568 | while holding do | |
569 | if mouse.Target then | |
570 | spaas(pp.Position,1,2,1,'New Yeller') | |
571 | mag = (pp.Position-mouse.hit.p).magnitude | |
572 | laz.Size = v3n(.1,mag,.1) | |
573 | laz.CFrame = (cfn(pp.Position,mouse.hit.p)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0) | |
574 | ||
575 | decp = T.P(1,0,1,'White',1,false,true) | |
576 | pos = mouse.Target.CFrame:pointToObjectSpace(mouse.hit.p) | |
577 | decp.CFrame = cfn(pos,mouse.hit.p)*ang(-math.pi,0,0) | |
578 | ||
579 | local pos = mouse.hit.p | |
580 | T.C(function() | |
581 | rand = M.R(1,3) | |
582 | local p = T.P(rand,1,rand,'Earth green',0,true,true) | |
583 | p.CFrame = cfn(pos) | |
584 | for i = 1,M.R(3,10) do | |
585 | wait() | |
586 | p.Size = v3n(p.Size.x,i,p.Size.z) | |
587 | p.CFrame = cfn(pos)+v3n(0,i/2,0) | |
588 | spaas(p.Position,10,1,1,'Deep blue') | |
589 | T.S('spark',1) | |
590 | end | |
591 | end) | |
592 | end | |
593 | wait() | |
594 | end | |
595 | laz:Remove() | |
596 | for i = 1,0,-.1 do | |
597 | wait() | |
598 | rw.C1 = normposr*ang(M.D(120*i),0,M.D(20*i)) | |
599 | hw.C1 = normh*ang(0,0,M.D(90*i)) | |
600 | end | |
601 | lock.R(0) | |
602 | end | |
603 | ||
604 | cannon = _ | |
605 | function cannonstaff() | |
606 | if not cannon then | |
607 | hw.C1 = normh | |
608 | cannon = T.P(1,3,1,'White',0,false,false) | |
609 | msh = T.FM(cannon,81616091,1,1,1,81616111) | |
610 | T.W(cannon,hdl,0,-1,0,math.pi,0,0) | |
611 | lock.R(1) | |
612 | for i = 0,1,.1 do | |
613 | rw.C1 = normposr*ang(M.D(180*i),0,0) | |
614 | msh.Scale = v3n(5*i,2.5*i,5*i) | |
615 | wait() | |
616 | end | |
617 | old=rw.C1 | |
618 | for i = 0,1,.1 do | |
619 | hw.C1 = normh*cfn(0,0,-3*i)*ang(math.pi/2*i,0,0) | |
620 | rw.C1 = old*ang(M.D(-90*i),0,0) | |
621 | wait() | |
622 | end | |
623 | else | |
624 | for i = 1,0,-.1 do | |
625 | hw.C1 = normh*cfn(0,0,-3*i)*ang(math.pi/2*i,0,0) | |
626 | rw.C1 = normposr*ang(M.D(90*i),0,0) | |
627 | msh.Scale = v3n(5*i,2.5*i,5*i) | |
628 | wait() | |
629 | end | |
630 | cannon:Remove() cannon = nil | |
631 | lock.R(0) | |
632 | end | |
633 | end | |
634 | ||
635 | plank = false | |
636 | flying = false | |
637 | ||
638 | plank = nil | |
639 | function Planko() | |
640 | if plank then plank:Remove() plank = nil return end | |
641 | plank = T.P(10,1,10,'White',1,true,true) | |
642 | plank.CFrame = torso.CFrame*cfn(0,-3.5,0) | |
643 | plank.Material = 'Wood' | |
644 | torso.CFrame = torso.CFrame+v3n(0,.2,0) | |
645 | T.C(function() | |
646 | while wait() do | |
647 | plank.Velocity = plank.CFrame.lookVector*30 | |
648 | plank.CFrame = torso.CFrame*cfn(0,-3.5,0) | |
649 | wait() | |
650 | end | |
651 | end) | |
652 | end | |
653 | ||
654 | function shoot() | |
655 | local bullet = T.P(1,1,3,'Black',0,true,false) | |
656 | local box = Instance.new("SelectionBox",bullet) | |
657 | box.Adornee = bullet | |
658 | bullet.CFrame = cannon.CFrame*cfn(0,6,0)*ang(math.pi/2,0,0) | |
659 | T.FM(bullet,'bullet',1,1,1) | |
660 | T.F(bullet,2,1,'Magenta','Alder') | |
661 | T.S('flintlock',1,200) | |
662 | Instance.new("BodyForce",bullet).force = torso.CFrame.lookVector*300+v3n(0,bullet:GetMass()*floatforce,0) | |
663 | bullet:BreakJoints() | |
664 | bullet.Touched:connect(function(hit) | |
665 | if not hit.Parent:IsDescendantOf(char) then | |
666 | T.S('boom',1,100,bullet) | |
667 | e = Instance.new("Explosion",Workspace) | |
668 | e.BlastPressure = 0 | |
669 | e.Position = bullet.Position | |
670 | e.Hit:connect(function(hit) damage(hit.Parent,30,1) end) | |
671 | local cf = bullet.CFrame*cfn(0,0,1.5) | |
672 | bullet:Remove() | |
673 | local part = T.P(1,1,1,'White',1,true,true) | |
674 | part.Touched:connect(function(hit) damage(hit.Parent,1) end) | |
675 | box.Adornee,box.Parent = part,part | |
676 | for i = 1,30 do | |
677 | part.Size = v3n(i,i,i) | |
678 | part.CFrame = cf*ang(M.D(360/30*i),M.D(360/30*i),M.D(360/30*i)) | |
679 | wait() | |
680 | end | |
681 | part:Remove() | |
682 | else | |
683 | T.S('plank',1,100,bullet) | |
684 | end | |
685 | end) | |
686 | for i = 0,1,.5 do | |
687 | rw.C1 = holdpos*ang(M.D(30*i),0,0) | |
688 | wait() | |
689 | end | |
690 | for i = 1,0,-.5 do | |
691 | rw.C1 = holdpos*ang(M.D(30*i),0,0) | |
692 | wait() | |
693 | end | |
694 | end | |
695 | ||
696 | function lightning() | |
697 | lock.R(1) lock.L(1) | |
698 | ||
699 | for i = 0,1,.1 do | |
700 | rw.C1 = normposr*ang(M.D(100*i),0,M.D(-30*i))*cfn(0,-.7*i,0) | |
701 | lw.C1 = normposl*ang(M.D(150*i),0,M.D(15*i)) | |
702 | hw.C1 = normh*ang(0,0,M.D(50*i)) | |
703 | wait() | |
704 | end | |
705 | wait(1) | |
706 | fire = T.F(pp,1,1,'White','Black') | |
707 | for i = 1,0,-.1 do | |
708 | rw.C1 = normposr*ang(M.D(100*i),0,M.D(-30*i))*cfn(0,-.7*i,0) | |
709 | lw.C1 = normposl*ang(M.D(150*i),0,M.D(15*i)) | |
710 | wait() | |
711 | end | |
712 | for i = 0,1,.1 do | |
713 | rw.C1 = normposr*ang(M.D(180*i),0,0) | |
714 | hw.C1 = normh*cfn(0,0,-2*i)*ang(M.D(-90*i),0,0) | |
715 | wait() | |
716 | end | |
717 | local p = T.P(1,1,1,'White',0,false,true) | |
718 | pos = torso.CFrame | |
719 | msh = T.FM(p,'sphere',1,1,1) | |
720 | fire.Parent = p | |
721 | for i = 1,30 do | |
722 | p.CFrame = pos*cfn(0,-3+i,0) | |
723 | msh.Scale = v3n(i,i,i) | |
724 | wait() | |
725 | end | |
726 | fire:Remove() | |
727 | msh.MeshId = 'rbxassetid://'..meshids['spikeb'] | |
728 | for i = 10,30 do | |
729 | msh.Scale = v3n(i,i,i) | |
730 | p.Transparency = i/30 | |
731 | wait() | |
732 | end | |
733 | ||
734 | p:Remove() | |
735 | for i = 1,0,-.1 do | |
736 | rw.C1 = normposr*ang(M.D(180*i),0,0) | |
737 | hw.C1 = normh*cfn(0,0,-2*i)*ang(M.D(-90*i),0,0) | |
738 | wait() | |
739 | end | |
740 | lock.R(0) lock.L(0) | |
741 | end | |
742 | ||
743 | function onButton1Down(a) | |
744 | if cannon then | |
745 | shoot(a) | |
746 | else | |
747 | star(a) | |
748 | end | |
749 | end | |
750 | ||
751 | nlist = {'f','r'} | |
752 | ||
753 | klist = { | |
754 | {'f',function(a) spark(a) end,''}, | |
755 | {'q',function() cannonstaff() end,''}, | |
756 | {'e',function() Planko() end}, | |
757 | {'r',function() lightning() end}, | |
758 | {'t',function(a) if a.Target then torso.CFrame = cfn(a.hit.p)+v3n(0,2.6,0) end end} | |
759 | } | |
760 | ||
761 | hop.Deselected:connect(function() lock.R(0) lock.L(0) end) | |
762 | hop.Selected:connect(function(mouse) | |
763 | mouse.Button1Up:connect(function() holding = false end) | |
764 | 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) | |
765 | mouse.KeyDown:connect(function(key) | |
766 | for i,v in pairs(nlist) do if key == v and cannon then return end end | |
767 | if attacking then return end | |
768 | for i,v in pairs(klist) do | |
769 | if key == v[1] then attacking = true v[2](mouse) attacking = false end | |
770 | end | |
771 | end) | |
772 | mouse.Button1Down:connect(function() if attacking then return end attacking = true onButton1Down(mouse) attacking = false end) | |
773 | end) | |
774 | --mediafire |