SHOW:
|
|
- or go back to the newest paste.
1 | - | --Made by N3xul. |
1 | + | --]] |
2 | - | -- Script Name: Classic Teapot Turret Reborn |
2 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
3 | - | -- Last Updated: |
3 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
4 | - | -- _ _ ____ _ _____ _ _ |
4 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
5 | - | -- | \ | |___ \ | | / ____| (_) | | |
5 | + | local RealPlayer = Player |
6 | - | -- | \| | __) |_ ___ _| | | (___ ___ _ __ _ _ __ | |_ |
6 | + | 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 |
7 | - | -- | . ` ||__ <\ \/ / | | | | \___ \ / __| '__| | '_ \| __| |
7 | + | |
8 | - | -- | |\ |___) |> <| |_| | | ____) | (__| | | | |_) | |_ |
8 | + | |
9 | - | -- |_| \_|____//_/\_\\__,_|_| |_____/ \___|_| |_| .__/ \__| |
9 | + | |
10 | - | -- | | |
10 | + | |
11 | - | -- |_| |
11 | + | |
12 | if k:lower() == 'script' then | |
13 | return scri | |
14 | else | |
15 | return oldenv[k] | |
16 | end | |
17 | end | |
18 | }) | |
19 | setfenv(f, newenv) | |
20 | ypcall(function() f() end) | |
21 | end | |
22 | cors = {} | |
23 | mas = Instance.new("Model",game:GetService("Lighting")) | |
24 | mas.Name = "CompiledModel" | |
25 | o1 = Instance.new("Tool") | |
26 | o2 = Instance.new("Part") | |
27 | o3 = Instance.new("SpecialMesh") | |
28 | o4 = Instance.new("Sound") | |
29 | o5 = Instance.new("LocalScript") | |
30 | o6 = Instance.new("Script") | |
31 | o7 = Instance.new("HopperBin") | |
32 | o8 = Instance.new("LocalScript") | |
33 | o9 = Instance.new("HopperBin") | |
34 | o10 = Instance.new("Sound") | |
35 | o11 = Instance.new("LocalScript") | |
36 | o12 = Instance.new("HopperBin") | |
37 | o13 = Instance.new("Script") | |
38 | o14 = Instance.new("Sound") | |
39 | o1.Name = "GravityHammer" | |
40 | o1.Parent = mas | |
41 | o1.TextureId = "http://www.roblox.com/asset/?id=1256305" | |
42 | o1.GripForward = Vector3.new(-1, -0, -0) | |
43 | o1.GripPos = Vector3.new(0, 0, -3.25) | |
44 | o1.GripRight = Vector3.new(0, 1, 0) | |
45 | o1.GripUp = Vector3.new(0, 0, 1) | |
46 | o2.Name = "Handle" | |
47 | o2.Parent = o1 | |
48 | o2.BrickColor = BrickColor.new("Dark stone grey") | |
49 | o2.Reflectance = 0.40000000596046 | |
50 | o2.Position = Vector3.new(-7.53602743, 4.99960041, -31.5799809) | |
51 | o2.Rotation = Vector3.new(-90, 0.0500000007, 180) | |
52 | o2.FormFactor = Enum.FormFactor.Plate | |
53 | o2.Size = Vector3.new(1, 0.800000012, 10) | |
54 | o2.CFrame = CFrame.new(-7.53602743, 4.99960041, -31.5799809, -0.999999642, -7.56997451e-07, 0.000796274224, 0.000796274282, 9.09494702e-13, 0.999999702, -7.5623251e-07, 0.99999994, 6.00266503e-10) | |
55 | o2.BottomSurface = Enum.SurfaceType.Smooth | |
56 | o2.TopSurface = Enum.SurfaceType.Smooth | |
57 | o2.Color = Color3.new(0.388235, 0.372549, 0.384314) | |
58 | o2.Position = Vector3.new(-7.53602743, 4.99960041, -31.5799809) | |
59 | o2.Orientation = Vector3.new(-89.9599991, 90, 90) | |
60 | o2.Color = Color3.new(0.388235, 0.372549, 0.384314) | |
61 | o3.Parent = o2 | |
62 | o3.MeshId = "http://www.roblox.com/asset/?id=1256290" | |
63 | o3.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007) | |
64 | o3.TextureId = "http://www.roblox.com/asset/?id=1256283" | |
65 | o3.MeshType = Enum.MeshType.FileMesh | |
66 | o3.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007) | |
67 | o4.Parent = o2 | |
68 | o4.SoundId = "http://www.roblox.com/asset/?id=1255794" | |
69 | o4.Volume = 1 | |
70 | o5.Name = "Local Gui" | |
71 | o5.Parent = o1 | |
72 | table.insert(cors,coroutine.create(function() | |
73 | wait() | |
74 | runDummyScript(function() | |
75 | ||
76 | end,o5) | |
77 | end)) | |
78 | o6.Name = "SwordScript" | |
79 | o6.Parent = o1 | |
80 | table.insert(cors,coroutine.create(function() | |
81 | wait() | |
82 | runDummyScript(function() | |
83 | -------- OMG HAX | |
84 | ||
85 | ||
86 | ||
87 | r = game:service("RunService") | |
88 | ||
89 | ||
90 | ||
91 | ||
92 | ||
93 | local damage = 5 | |
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | local slash_damage = 10 | |
100 | ||
101 | local lunge_damage = 30 | |
102 | ||
103 | ||
104 | ||
105 | sword = script.Parent.Handle | |
106 | ||
107 | Tool = script.Parent | |
108 | ||
109 | ||
110 | ||
111 | SlashSound = sword.Sound | |
112 | ||
113 | ||
114 | ||
115 | function blow(hit) | |
116 | ||
117 | Grip = Tool.Parent["Right Arm"].RightGrip:clone() | |
118 | ||
119 | humanoid = hit.Parent:findFirstChild("Humanoid") | |
120 | ||
121 | if(humanoid ~= nil and humanoid.Parent.Name == Tool.Parent.Name) then --don't hit yourself | |
122 | ||
123 | return | |
124 | ||
125 | end | |
126 | ||
127 | ||
128 | ||
129 | --if(Tool:findFirstChild("toolAnim") == nil) then return end | |
130 | ||
131 | if(humanoid ~= nil) then --if it's a person, damage him and stop | |
132 | ||
133 | propel(hit) | |
134 | ||
135 | print(humanoid.Parent.Name) | |
136 | ||
137 | humanoid.Health = humanoid.Health - 49 | |
138 | ||
139 | else | |
140 | ||
141 | explode(hit) --explode only if it doesn't hit a person (ie, blowing holes through walls) | |
142 | ||
143 | end | |
144 | ||
145 | ||
146 | ||
147 | end | |
148 | ||
149 | ||
150 | ||
151 | function propel(part) | |
152 | ||
153 | if(part.Anchored) then return end --if it isn't anchored, make it flyyy | |
154 | ||
155 | direction = (part.Position - Tool.Parent.Torso.Position).unit | |
156 | ||
157 | direction = direction + Vector3.new(0,1,0) | |
158 | ||
159 | direction = direction * 200 | |
160 | ||
161 | part.Velocity = part.Velocity + direction | |
162 | ||
163 | end | |
164 | ||
165 | ||
166 | ||
167 | debounce = true | |
168 | ||
169 | function explode(part) | |
170 | ||
171 | if not debounce then return end | |
172 | ||
173 | ||
174 | ||
175 | debounce = false | |
176 | ||
177 | direction = (part.Position - Tool.Parent.Torso.Position).unit | |
178 | ||
179 | pos = direction * 12 + Tool.Parent.Torso.Position | |
180 | ||
181 | explosion = Instance.new("Explosion") | |
182 | ||
183 | explosion.BlastRadius = 4 | |
184 | ||
185 | explosion.BlastPressure = 1 | |
186 | ||
187 | explosion.Position = pos | |
188 | ||
189 | explosion.Parent = game.Workspace | |
190 | ||
191 | explosion.Hit:connect(function(part, distance) propel(part) end) | |
192 | ||
193 | wait(.1) | |
194 | ||
195 | Grip:clone().Parent = Tool.Parent["Right Arm"] | |
196 | ||
197 | debounce = true | |
198 | ||
199 | end | |
200 | ||
201 | ||
202 | ||
203 | function attack() | |
204 | ||
205 | SlashSound:play() | |
206 | ||
207 | local anim = Instance.new("StringValue") | |
208 | ||
209 | anim.Name = "toolanim" | |
210 | ||
211 | anim.Value = "Slash" | |
212 | ||
213 | anim.Parent = Tool | |
214 | ||
215 | end | |
216 | ||
217 | ||
218 | ||
219 | function lunge() | |
220 | ||
221 | attack() | |
222 | ||
223 | force = Instance.new("BodyPosition") | |
224 | ||
225 | force.maxForce = Vector3.new(1e+005,1e+004,1e+005) | |
226 | ||
227 | dir = Tool.Parent.Humanoid.targetPoint | |
228 | ||
229 | if((dir - sword.Position).magnitude > 15) then return end | |
230 | ||
231 | force.position = dir | |
232 | ||
233 | force.Parent = sword | |
234 | ||
235 | wait(.25) | |
236 | ||
237 | force.Parent = nil | |
238 | ||
239 | end | |
240 | ||
241 | ||
242 | ||
243 | function swordUp() | |
244 | ||
245 | Tool.GripForward = Vector3.new(-1,0,0) | |
246 | ||
247 | Tool.GripRight = Vector3.new(0,1,0) | |
248 | ||
249 | Tool.GripUp = Vector3.new(0,0,1) | |
250 | ||
251 | end | |
252 | ||
253 | ||
254 | ||
255 | function swordOut() | |
256 | ||
257 | Tool.GripForward = Vector3.new(0,0,1) | |
258 | ||
259 | Tool.GripRight = Vector3.new(0,-1,0) | |
260 | ||
261 | Tool.GripUp = Vector3.new(-1,0,0) | |
262 | ||
263 | end | |
264 | ||
265 | ||
266 | ||
267 | function swordAcross() | |
268 | ||
269 | -- parry | |
270 | ||
271 | end | |
272 | ||
273 | ||
274 | ||
275 | ||
276 | ||
277 | Tool.Enabled = true | |
278 | ||
279 | local last_attack = 0 | |
280 | ||
281 | function onActivated() | |
282 | ||
283 | ||
284 | ||
285 | if not Tool.Enabled then | |
286 | ||
287 | return | |
288 | ||
289 | end | |
290 | ||
291 | ||
292 | ||
293 | Tool.Enabled = false | |
294 | ||
295 | ||
296 | ||
297 | local character = Tool.Parent; | |
298 | ||
299 | local humanoid = character.Humanoid | |
300 | ||
301 | if humanoid == nil then | |
302 | ||
303 | print("Humanoid not found") | |
304 | ||
305 | return | |
306 | ||
307 | end | |
308 | ||
309 | ||
310 | ||
311 | t = r.Stepped:wait() | |
312 | ||
313 | connection = sword.Touched:connect(blow) | |
314 | ||
315 | lunge() | |
316 | ||
317 | ||
318 | ||
319 | wait(.4) | |
320 | ||
321 | connection:disconnect() | |
322 | ||
323 | last_attack = t | |
324 | ||
325 | Tool.Enabled = true | |
326 | ||
327 | ||
328 | ||
329 | ||
330 | ||
331 | end | |
332 | ||
333 | script.Parent.Activated:connect(onActivated) | |
334 | ||
335 | ||
336 | ||
337 | ||
338 | ||
339 | ||
340 | end,o6) | |
341 | end)) | |
342 | o7.Name = "Fire Shield" | |
343 | o7.Parent = mas | |
344 | o8.Parent = o7 | |
345 | table.insert(cors,coroutine.create(function() | |
346 | wait() | |
347 | runDummyScript(function() | |
348 | --clockwork | |
349 | ||
350 | --Fix implemented by Luckymaxer | |
351 | ||
352 | HopperBin = script.Parent | |
353 | ||
354 | Debris = game:GetService("Debris") | |
355 | ||
356 | function GetX(t) | |
357 | return 41 * math.cos(t) - 18 * math.sin(t) - 83 * math.cos(2 * t) - 11 * math.cos(3 * t) + 27 * math.sin(3 * t) | |
358 | end | |
359 | ||
360 | function GetY(t) | |
361 | return 36 * math.cos(t) + 27 * math.sin(t) - 113 * math.cos(2 * t) + 30 * math.sin(2 * t) + 11 * math.cos(3 * t) - 27 * math.sin(3 * t) | |
362 | end | |
363 | ||
364 | function GetZ(t) | |
365 | return 45 * math.sin(t) - 30 * math.cos(2 * t) + 113 * math.sin(2 * t) - 11 * math.cos(3 * t) + 27 * math.sin(3 * t) | |
366 | end | |
367 | ||
368 | Template = Instance.new("Explosion") | |
369 | Template.BlastRadius = 3 | |
370 | Template.BlastPressure = 0 | |
371 | Template.ExplosionType = Enum.ExplosionType.NoCraters | |
372 | ||
373 | Spaw = false | |
374 | ||
375 | function TagHumanoid(humanoid, player) | |
376 | local Creator_Tag = Instance.new("ObjectValue") | |
377 | Creator_Tag.Name = "creator" | |
378 | Creator_Tag.Value = player | |
379 | Debris:AddItem(Creator_Tag, 2) | |
380 | Creator_Tag.Parent = humanoid | |
381 | end | |
382 | ||
383 | function UntagHumanoid(humanoid) | |
384 | for i, v in pairs(humanoid:GetChildren()) do | |
385 | if v:IsA("ObjectValue") and v.Name == "creator" then | |
386 | v:Destroy() | |
387 | end | |
388 | end | |
389 | end | |
390 | ||
391 | function FindCharacterAncestor(Parent) | |
392 | if Parent and Parent ~= game:GetService("Workspace") then | |
393 | local humanoid = Parent:FindFirstChild("Humanoid") | |
394 | if humanoid then | |
395 | return Parent, humanoid | |
396 | else | |
397 | return FindCharacterAncestor(Parent.Parent) | |
398 | end | |
399 | end | |
400 | return nil | |
401 | end | |
402 | ||
403 | function ExplosionHit(Explosion) | |
404 | Explosion.Hit:connect(function(Hit) | |
405 | if Hit and Hit.Parent then | |
406 | local character, humanoid = FindCharacterAncestor(Hit) | |
407 | if character and character ~= Character and humanoid and humanoid.Health > 0 then | |
408 | UntagHumanoid(humanoid) | |
409 | TagHumanoid(humanoid, Player) | |
410 | Hit:BreakJoints() | |
411 | end | |
412 | end | |
413 | end) | |
414 | end | |
415 | ||
416 | function Button1Down() | |
417 | Spaw = not Spaw | |
418 | i = 0 | |
419 | if Spaw then | |
420 | while Spaw do | |
421 | i = (i + 0.15) | |
422 | local Explosion = Template:Clone() | |
423 | Explosion.Position = Torso.Position + Vector3.new(GetX(i) / 5, GetY(i) / 5, GetZ(i) / 5) | |
424 | ExplosionHit(Explosion) | |
425 | Explosion.Parent = game:GetService("Workspace") | |
426 | Explosion = Template:Clone() | |
427 | Explosion.Position = Torso.Position - Vector3.new(GetX(i) / 5, GetY(i) / 5, GetZ(i) / 5) | |
428 | ExplosionHit(Explosion) | |
429 | Explosion.Parent = game:GetService("Workspace") | |
430 | wait(0.025) | |
431 | end | |
432 | end | |
433 | end | |
434 | ||
435 | function Selected(Mouse) | |
436 | Backpack = HopperBin.Parent | |
437 | Player = Backpack.Parent | |
438 | Character = Player.Character | |
439 | Humanoid = Character:FindFirstChild("Humanoid") | |
440 | Torso = Character:FindFirstChild("Torso") | |
441 | if not Player or not Character or not Humanoid or Humanoid.Health == 0 or not Torso then | |
442 | return | |
443 | end | |
444 | Mouse.Button1Down:connect(function() | |
445 | Button1Down() | |
446 | end) | |
447 | Mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
448 | end | |
449 | ||
450 | HopperBin.Selected:connect(Selected) | |
451 | end,o8) | |
452 | end)) | |
453 | o9.Name = "Katon Goukakyou No Jutsu" | |
454 | o9.Parent = mas | |
455 | o10.Parent = o9 | |
456 | o10.SoundId = "http://www.roblox.com/asset/?id=1079802" | |
457 | o10.Volume = 0.20000000298023 | |
458 | o11.Parent = o9 | |
459 | table.insert(cors,coroutine.create(function() | |
460 | wait() | |
461 | runDummyScript(function() | |
462 | --clockwork | |
463 | ||
464 | --Fix implemented by Luckymaxer | |
465 | ||
466 | HopperBin = script.Parent | |
467 | ||
468 | Sound = HopperBin:WaitForChild("Sound") | |
469 | ||
470 | Debris = game:GetService("Debris") | |
471 | ||
472 | function TagHumanoid(humanoid, player) | |
473 | local Creator_Tag = Instance.new("ObjectValue") | |
474 | Creator_Tag.Name = "creator" | |
475 | Creator_Tag.Value = player | |
476 | Debris:AddItem(Creator_Tag, 2) | |
477 | Creator_Tag.Parent = humanoid | |
478 | end | |
479 | ||
480 | function UntagHumanoid(humanoid) | |
481 | for i, v in pairs(humanoid:GetChildren()) do | |
482 | if v:IsA("ObjectValue") and v.Name == "creator" then | |
483 | v:Destroy() | |
484 | end | |
485 | end | |
486 | end | |
487 | ||
488 | function FindCharacterAncestor(Parent) | |
489 | if Parent and Parent ~= game:GetService("Workspace") then | |
490 | local humanoid = Parent:FindFirstChild("Humanoid") | |
491 | if humanoid then | |
492 | return Parent, humanoid | |
493 | else | |
494 | return FindCharacterAncestor(Parent.Parent) | |
495 | end | |
496 | end | |
497 | return nil | |
498 | end | |
499 | ||
500 | function ExplosionHit(Explosion) | |
501 | Explosion.Hit:connect(function(Hit) | |
502 | if Hit and Hit.Parent then | |
503 | local character, humanoid = FindCharacterAncestor(Hit) | |
504 | if character and character ~= Character and humanoid and humanoid.Health > 0 then | |
505 | UntagHumanoid(humanoid) | |
506 | TagHumanoid(humanoid, Player) | |
507 | Hit:BreakJoints() | |
508 | end | |
509 | end | |
510 | end) | |
511 | end | |
512 | ||
513 | function Explode(Position) | |
514 | local Explosion = Instance.new("Explosion") | |
515 | Explosion.BlastRadius = 10 | |
516 | Explosion.BlastPressure = 0 | |
517 | Explosion.ExplosionType = Enum.ExplosionType.NoCraters | |
518 | Explosion.Position = Position | |
519 | ExplosionHit(Explosion) | |
520 | Explosion.Parent = game:GetService("Workspace") | |
521 | end | |
522 | ||
523 | function Button1Down(Mouse) | |
524 | local StartPos = Head.Position | |
525 | local Delta = Mouse.Hit.p - StartPos | |
526 | local Unit = Delta.unit | |
527 | Sound:Play() | |
528 | for i = 0, 75 do | |
529 | Explode(StartPos + Unit * 20 + i * Unit * i / 25) | |
530 | wait(0.05) | |
531 | end | |
532 | end | |
533 | ||
534 | function Selected(Mouse) | |
535 | Backpack = HopperBin.Parent | |
536 | Player = Backpack.Parent | |
537 | Character = Player.Character | |
538 | Humanoid = Character:FindFirstChild("Humanoid") | |
539 | Head = Character:FindFirstChild("Head") | |
540 | if not Player or not Character or not Humanoid or Humanoid.Health == 0 or not Head then | |
541 | return | |
542 | end | |
543 | Mouse.Button1Down:connect(function() | |
544 | Button1Down(Mouse) | |
545 | end) | |
546 | Mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
547 | end | |
548 | ||
549 | HopperBin.Selected:connect(Selected) | |
550 | end,o11) | |
551 | end)) | |
552 | o12.Name = "SpinFire" | |
553 | o12.Parent = mas | |
554 | o13.Parent = o12 | |
555 | table.insert(cors,coroutine.create(function() | |
556 | wait() | |
557 | runDummyScript(function() | |
558 | --clockwork | |
559 | ||
560 | ||
561 | ||
562 | local bin = script.Parent | |
563 | ||
564 | sfx = bin.Sound | |
565 | ||
566 | ||
567 | ||
568 | function explode(pos) | |
569 | ||
570 | local lol = Instance.new("Explosion") | |
571 | ||
572 | lol.BlastRadius = 2 | |
573 | ||
574 | lol.BlastPressure = 1000000 | |
575 | ||
576 | lol.Position = pos | |
577 | ||
578 | lol.Parent = game.Workspace | |
579 | ||
580 | end | |
581 | ||
582 | ||
583 | ||
584 | function onButton1Down(mouse) | |
585 | ||
586 | local player = game.Players.LocalPlayer | |
587 | ||
588 | if player == nil then return end | |
589 | ||
590 | print("trigger") | |
591 | ||
592 | -- find the best cf | |
593 | ||
594 | ||
595 | ||
596 | sfx:play() | |
597 | ||
598 | look = CFrame.new(player.Character.Head.Position,mouse.Hit.p) | |
599 | ||
600 | for i=0,75 do | |
601 | ||
602 | x = math.sin(i / 3) * 8 * (75 - i) / 75 | |
603 | ||
604 | y = math.cos(i / 3) * 8 * (75 - i) / 75 | |
605 | ||
606 | helix = look * CFrame.new(x,y,-i) | |
607 | ||
608 | ||
609 | ||
610 | explode(helix.p) | |
611 | ||
612 | ||
613 | ||
614 | x = -math.sin(i / 3) * 8 * (75 - i) / 75 | |
615 | ||
616 | y = -math.cos(i / 3) * 8 * (75 - i) / 75 | |
617 | ||
618 | helix = look * CFrame.new(x,y,-i) | |
619 | ||
620 | ||
621 | ||
622 | explode(helix.p) | |
623 | ||
624 | wait(.02) | |
625 | ||
626 | end | |
627 | ||
628 | sfx:pause() | |
629 | ||
630 | end | |
631 | ||
632 | ||
633 | ||
634 | function onSelected(mouse) | |
635 | ||
636 | print("select") | |
637 | ||
638 | mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
639 | ||
640 | mouse.Button1Down:connect(function() onButton1Down(mouse) end) | |
641 | ||
642 | end | |
643 | ||
644 | ||
645 | ||
646 | bin.Selected:connect(onSelected) | |
647 | ||
648 | ||
649 | end,o13) | |
650 | end)) | |
651 | o14.Parent = o12 | |
652 | o14.SoundId = "http://www.roblox.com/asset/?id=12222095" | |
653 | o14.Volume = 0.60000002384186 | |
654 | mas.Parent = workspace | |
655 | mas:MakeJoints() | |
656 | local mas1 = mas:GetChildren() | |
657 | for i=1,#mas1 do | |
658 | mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack | |
659 | ypcall(function() mas1[i]:MakeJoints() end) | |
660 | end | |
661 | mas:Destroy() | |
662 | for i=1,#cors do | |
663 | coroutine.resume(cors[i]) | |
664 | end | |
665 | --Forcefield | |
666 | local f = Instance.new("ForceField") | |
667 | f.Parent = game.Players.localPlayer.Character | |
668 | --Teapot | |
669 | hat = Instance.new'Accessory' | |
670 | hat.Name = 'GoldTeapot' | |
671 | hat.AttachmentForward = Vector3.new(0,0,-1) | |
672 | hat.AttachmentPos = Vector3.new(0, 0.300000012, 0) | |
673 | hat.AttachmentUp = Vector3.new(0, 1, 0) | |
674 | hat.AttachmentRight = Vector3.new(1, 0, 0) | |
675 | handle = Instance.new('Part', hat) | |
676 | handle.Name = 'Handle' | |
677 | handle.Locked = true | |
678 | handle.CanCollide = true | |
679 | handle.Transparency = 0 | |
680 | handle.BrickColor = BrickColor.new'Medium stone grey' | |
681 | handle.Size = Vector3.new(2, 0.800000012, 2) | |
682 | mesh = Instance.new('SpecialMesh', handle) | |
683 | mesh.MeshId = 'http://www.roblox.com/asset/?id=1594167' | |
684 | mesh.Scale = Vector3.new(1, 1, 1) | |
685 | mesh.VertexColor = Vector3.new(1, 1, 1) | |
686 | mesh.TextureId = 'http://www.roblox.com/asset/?id=1594166' | |
687 | att = Instance.new('Attachment', handle) | |
688 | att.Name = 'HatAt' | |
689 | att.Position = Vector3.new(8.65838956e-09, 0.400000095, -0.000272244215) | |
690 | att.Axis = Vector3.new(1, -7.87137555e-09, 0) | |
691 | att.SecondaryAxis = Vector3.new(7.87137555e-09, 1, 4.1444221e-16) | |
692 | hat.Parent = game:GetService'Players'.LocalPlayer.Character |