Advertisement
ttyyuu12345

Ice Ray

Jul 28th, 2016
955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.01 KB | None | 0 0
  1. --Created with ttyyuu12345's compiler
  2. --ttyyuu12345 is not responsible for damages caused to your game
  3. --This plugin does not remove things
  4. --ttyyuu12345 cannot be held resonsible for manual deletion for the purpose of testing
  5. --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
  6. --Thank you for using my plugin and enjoy :)
  7. --It is free to use, however I do accept donations
  8. --Errors: TouchTransmitter
  9. Create = function(itemClass,tabl)
  10. local item = Instance.new(itemClass)
  11. for i,v in pairs(tabl) do
  12. local a,b = ypcall(function() return item[i] end)
  13. if a then
  14. item[i] = tabl[i]
  15. end
  16. end
  17. return item
  18. end
  19. function runDummyScript(f,scri)
  20. local oldenv = getfenv(f)
  21. local newenv = setmetatable({}, {
  22. __index = function(_, k)
  23. if k:lower() == 'script' then
  24. return scri
  25. else
  26. return oldenv[k]
  27. end
  28. end
  29. })
  30. setfenv(f, newenv)
  31. ypcall(function() f() end)
  32. end
  33. cors = {}
  34. mas = Instance.new("Model",game:GetService("Lighting"))
  35. mas.Name = "CompiledModel"
  36. o1 = Create("Tool",{
  37. ["Name"] = "Ice Ray",
  38. ["Parent"] = mas,
  39. ["TextureId"] = "http://www.roblox.com/asset/?id=24666028",
  40. })
  41. o2 = Create("Part",{
  42. ["Name"] = "Handle",
  43. ["Parent"] = o1,
  44. ["BrickColor"] = BrickColor.new("Black"),
  45. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  46. ["Rotation"] = Vector3.new(-0, 90, 0),
  47. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  48. ["Size"] = Vector3.new(1, 1.20000005, 4),
  49. ["Color"] = Color3.new(0.105882, 0.164706, 0.207843),
  50. })
  51. o3 = Create("BlockMesh",{
  52. ["Parent"] = o2,
  53. ["Offset"] = Vector3.new(0.100000001, 0, 0.75),
  54. ["Scale"] = Vector3.new(0.75, 0.5, 0.5),
  55. })
  56. o4 = Create("Sound",{
  57. ["Name"] = "Fail",
  58. ["Parent"] = o2,
  59. ["Volume"] = 1,
  60. })
  61. o6 = Create("Part",{
  62. ["Name"] = "Part1",
  63. ["Parent"] = o1,
  64. ["Material"] = Enum.Material.Ice,
  65. ["BrickColor"] = BrickColor.new("Cyan"),
  66. ["Transparency"] = 0.5,
  67. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  68. ["Rotation"] = Vector3.new(-0, 90, 0),
  69. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  70. ["CanCollide"] = false,
  71. ["Size"] = Vector3.new(1, 1.20000005, 4),
  72. ["Color"] = Color3.new(0.0156863, 0.686275, 0.92549),
  73. })
  74. o7 = Create("BlockMesh",{
  75. ["Parent"] = o6,
  76. ["Offset"] = Vector3.new(0, 0, -0.800000012),
  77. ["Scale"] = Vector3.new(0.400000006, 0.400000006, 0.400000006),
  78. })
  79. o8 = Create("Weld",{
  80. ["Parent"] = o6,
  81. })
  82. o9 = Create("Weld",{
  83. ["Parent"] = o6,
  84. })
  85. o10 = Create("Weld",{
  86. ["Parent"] = o6,
  87. ["Part0"] = o6,
  88. ["Part1"] = o2,
  89. })
  90. o11 = Create("Part",{
  91. ["Name"] = "Part2",
  92. ["Parent"] = o1,
  93. ["Material"] = Enum.Material.Ice,
  94. ["BrickColor"] = BrickColor.new("Medium blue"),
  95. ["Transparency"] = 0.20000000298023,
  96. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  97. ["Rotation"] = Vector3.new(-0, 90, 0),
  98. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  99. ["CanCollide"] = false,
  100. ["Size"] = Vector3.new(1, 1.20000005, 4),
  101. ["Color"] = Color3.new(0.431373, 0.6, 0.792157),
  102. })
  103. o12 = Create("BlockMesh",{
  104. ["Parent"] = o11,
  105. ["Offset"] = Vector3.new(0, 0, -0.800000012),
  106. ["Scale"] = Vector3.new(0.200000003, 0.200000003, 0.400000006),
  107. })
  108. o13 = Create("Weld",{
  109. ["Parent"] = o11,
  110. })
  111. o14 = Create("Weld",{
  112. ["Parent"] = o11,
  113. })
  114. o15 = Create("Weld",{
  115. ["Parent"] = o11,
  116. ["Part0"] = o11,
  117. ["Part1"] = o2,
  118. })
  119. o16 = Create("Part",{
  120. ["Name"] = "Part3",
  121. ["Parent"] = o1,
  122. ["Material"] = Enum.Material.Ice,
  123. ["BrickColor"] = BrickColor.new("Pastel blue-green"),
  124. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  125. ["Rotation"] = Vector3.new(-0, 90, 0),
  126. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  127. ["CanCollide"] = false,
  128. ["Size"] = Vector3.new(1, 1.20000005, 4),
  129. ["Color"] = Color3.new(0.623529, 0.952941, 0.913726),
  130. })
  131. o17 = Create("BlockMesh",{
  132. ["Parent"] = o16,
  133. ["Offset"] = Vector3.new(0, 0, -1.60000002),
  134. ["Scale"] = Vector3.new(0.439999998, 0.439999998, 0.0399999991),
  135. })
  136. o18 = Create("Weld",{
  137. ["Parent"] = o16,
  138. })
  139. o19 = Create("Weld",{
  140. ["Parent"] = o16,
  141. })
  142. o20 = Create("Weld",{
  143. ["Parent"] = o16,
  144. ["Part0"] = o16,
  145. ["Part1"] = o2,
  146. })
  147. o21 = Create("Part",{
  148. ["Name"] = "Part4",
  149. ["Parent"] = o1,
  150. ["Material"] = Enum.Material.Ice,
  151. ["BrickColor"] = BrickColor.new("Pastel light blue"),
  152. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  153. ["Rotation"] = Vector3.new(-0, 90, 0),
  154. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  155. ["CanCollide"] = false,
  156. ["Size"] = Vector3.new(1, 1.20000005, 4),
  157. ["Color"] = Color3.new(0.686275, 0.866667, 1),
  158. })
  159. o22 = Create("BlockMesh",{
  160. ["Parent"] = o21,
  161. ["Offset"] = Vector3.new(0.400000006, 0, -0.800000012),
  162. ["Scale"] = Vector3.new(0.0399999991, 0.0399999991, 0.400000006),
  163. })
  164. o23 = Create("Weld",{
  165. ["Parent"] = o21,
  166. })
  167. o24 = Create("Weld",{
  168. ["Parent"] = o21,
  169. })
  170. o25 = Create("Weld",{
  171. ["Parent"] = o21,
  172. ["Part0"] = o21,
  173. ["Part1"] = o2,
  174. })
  175. o26 = Create("Part",{
  176. ["Name"] = "Part5",
  177. ["Parent"] = o1,
  178. ["Material"] = Enum.Material.Ice,
  179. ["BrickColor"] = BrickColor.new("Cyan"),
  180. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  181. ["Rotation"] = Vector3.new(-0, 90, 0),
  182. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  183. ["CanCollide"] = false,
  184. ["Size"] = Vector3.new(1, 1.20000005, 4),
  185. ["Color"] = Color3.new(0.0156863, 0.686275, 0.92549),
  186. })
  187. o27 = Create("BlockMesh",{
  188. ["Parent"] = o26,
  189. ["Offset"] = Vector3.new(0.200000003, 0, -1.60000002),
  190. ["Scale"] = Vector3.new(0.400000006, 0.0399999991, 0.0199999996),
  191. })
  192. o28 = Create("Weld",{
  193. ["Parent"] = o26,
  194. })
  195. o29 = Create("Weld",{
  196. ["Parent"] = o26,
  197. })
  198. o30 = Create("Weld",{
  199. ["Parent"] = o26,
  200. ["Part0"] = o26,
  201. ["Part1"] = o2,
  202. })
  203. o31 = Create("Part",{
  204. ["Name"] = "Part6",
  205. ["Parent"] = o1,
  206. ["Material"] = Enum.Material.Ice,
  207. ["BrickColor"] = BrickColor.new("Bright blue"),
  208. ["Position"] = Vector3.new(-6, 0.600004971, -12.5),
  209. ["Rotation"] = Vector3.new(-0, 90, 0),
  210. ["CFrame"] = CFrame.new(-6, 0.600004971, -12.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
  211. ["CanCollide"] = false,
  212. ["Size"] = Vector3.new(1, 1.20000005, 4),
  213. ["Color"] = Color3.new(0.0509804, 0.411765, 0.67451),
  214. })
  215. o32 = Create("BlockMesh",{
  216. ["Parent"] = o31,
  217. ["Offset"] = Vector3.new(0, 0, -2),
  218. ["Scale"] = Vector3.new(0.0799999982, 0.0799999982, 0.200000003),
  219. })
  220. o33 = Create("Weld",{
  221. ["Parent"] = o31,
  222. })
  223. o34 = Create("Weld",{
  224. ["Parent"] = o31,
  225. })
  226. o35 = Create("Weld",{
  227. ["Parent"] = o31,
  228. ["Part0"] = o31,
  229. ["Part1"] = o2,
  230. })
  231. o36 = Create("BoolValue",{
  232. ["Name"] = "Fire",
  233. ["Parent"] = o1,
  234. })
  235. o37 = Create("Script",{
  236. ["Name"] = "LaserFireAnimation",
  237. ["Parent"] = o1,
  238. })
  239. table.insert(cors,coroutine.create(function()
  240. wait()
  241. runDummyScript(function()
  242. laser = script.Parent
  243. while true do
  244. if (script.Parent.Fire.Value) then
  245. for a = 1, 2 do
  246. laser.Part1.Mesh.Offset = laser.Part1.Mesh.Offset + Vector3.new(0,0,0.2)
  247. laser.Part2.Mesh.Offset = laser.Part2.Mesh.Offset + Vector3.new(0,0,0.2)
  248. laser.Part3.Mesh.Offset = laser.Part3.Mesh.Offset + Vector3.new(0,0,0.2)
  249. laser.Part4.Mesh.Offset = laser.Part4.Mesh.Offset + Vector3.new(0,0,0.2)
  250. laser.Part5.Mesh.Offset = laser.Part5.Mesh.Offset + Vector3.new(0,0,0.2)
  251. laser.Part6.Mesh.Offset = laser.Part6.Mesh.Offset + Vector3.new(0,0,0.2)
  252. wait()
  253. end
  254. for a = 1, 2 do
  255. laser.Part1.Mesh.Offset = laser.Part1.Mesh.Offset - Vector3.new(0,0,0.2)
  256. laser.Part2.Mesh.Offset = laser.Part2.Mesh.Offset - Vector3.new(0,0,0.2)
  257. laser.Part3.Mesh.Offset = laser.Part3.Mesh.Offset - Vector3.new(0,0,0.2)
  258. laser.Part4.Mesh.Offset = laser.Part4.Mesh.Offset - Vector3.new(0,0,0.2)
  259. laser.Part5.Mesh.Offset = laser.Part5.Mesh.Offset - Vector3.new(0,0,0.2)
  260. laser.Part6.Mesh.Offset = laser.Part6.Mesh.Offset - Vector3.new(0,0,0.2)
  261. wait()
  262. end
  263. script.Parent.Fire.Value = false
  264. end
  265. wait()
  266. end
  267.  
  268. end,o37)
  269. end))
  270. o38 = Create("Script",{
  271. ["Name"] = "WeldScript",
  272. ["Parent"] = o1,
  273. })
  274. table.insert(cors,coroutine.create(function()
  275. wait()
  276. runDummyScript(function()
  277. t = script.Parent
  278.  
  279. function stick(x, y)
  280. weld = Instance.new("Weld")
  281. weld.Part0 = x
  282. weld.Part1 = y
  283. local HitPos = x.Position
  284. local CJ = CFrame.new(HitPos)
  285. local C0 = x.CFrame:inverse() *CJ
  286. local C1 = y.CFrame:inverse() * CJ
  287. weld.C0 = C0
  288. weld.C1 = C1
  289. weld.Parent = x
  290. end
  291.  
  292. function Weldnow()
  293. c = t:children()
  294. for n = 1, #c do
  295. if (c[n].className == "Part") then
  296. if (c[n].Name ~= "Handle") then
  297. c[n].CFrame = t.Handle.CFrame
  298. stick(c[n], t.Handle)
  299. end
  300. end
  301. end
  302. end
  303.  
  304. script.Parent.Equipped:connect(Weldnow)
  305. script.Parent.Unequipped:connect(Weldnow)
  306. Weldnow()
  307. end,o38)
  308. end))
  309. o39 = Create("LocalScript",{
  310. ["Name"] = "Local Gui",
  311. ["Parent"] = o1,
  312. })
  313. table.insert(cors,coroutine.create(function()
  314. wait()
  315. runDummyScript(function()
  316. local Tool = script.Parent;
  317. debris = game:GetService("Debris")
  318.  
  319. colors = {BrickColor.new("Medium Blue"), BrickColor.new("Pastel light blue"), BrickColor.new("Light blue"), BrickColor.new("Cyan"), BrickColor.new("Pastel blue")}
  320.  
  321. function stick(x, y)
  322. weld = Instance.new("Weld")
  323. weld.Part0 = x
  324. weld.Part1 = y
  325. local HitPos = x.Position
  326. local CJ = CFrame.new(HitPos)
  327. local C0 = x.CFrame:inverse() *CJ
  328. local C1 = y.CFrame:inverse() * CJ
  329. weld.C0 = C0
  330. weld.C1 = C1
  331. weld.Parent = x
  332. end
  333.  
  334. enabled = true
  335.  
  336. function onButton1Down(mouse)
  337. if (not enabled) then return end
  338. enabled = false
  339. script.Parent.Fire.Value = true
  340. targ = mouse.Target
  341. if (targ == nil) then
  342. script.Parent.Handle.Fail:play()
  343. enabled = true
  344. return
  345. end
  346. hum = targ.Parent:findFirstChild("Humanoid") or targ.Parent:findFirstChild("Zombie") or targ.Parent:findFirstChild("Alien")
  347. if (hum ~= nil) then
  348. script.Parent.Handle.Fail:play()
  349. m = Instance.new("Model")
  350. m.Name = targ.Parent.Name
  351. m.Parent = Workspace
  352. h = Instance.new("Humanoid")
  353. h.MaxHealth = 0
  354. h.Health = 0
  355. h.Name = "ICE"
  356. h.Parent = m
  357. c = Instance.new("ObjectValue")
  358. c.Name = "creator"
  359. c.Value = game.Players:findFirstChild(script.Parent.Parent.Name)
  360. c.Parent = hum
  361. k = hum.Parent:GetChildren()
  362. for i =1,#k do
  363. if (k[i].className == "Part") and (k[i].Name ~= "Head") then
  364. k[i].Anchored = true
  365. k[i].BrickColor = colors[math.random(1, #colors)]
  366. k[i].Friction = .01
  367. if ( math.random() > .5) then
  368. k[i].Material = Enum.Material.Ice
  369. else
  370. k[i].Transparency = .1 + (math.random(1,4) / 10)
  371. end
  372. k[i].TopSurface = 0
  373. k[i].BottomSurface = 0
  374. k[i].Parent = m
  375. end end
  376.  
  377. t = hum.Parent:GetChildren()
  378. for l = 1,#t do
  379. if (t[l].className == "Tool") then
  380. j = t[l]:GetChildren()
  381. for y = 1,#j do
  382. if (j[y].className == "Part") then
  383. j[y].Anchored = true
  384. j[y].BrickColor = colors[math.random(1, #colors)]
  385. j[y].Friction = .01
  386. if ( math.random() > .5) then
  387. j[y].Material = Enum.Material.Ice
  388. else
  389. j[y].Transparency = .1 + (math.random(1,4) / 10)
  390. end
  391. j[y].TopSurface = 0
  392. j[y].BottomSurface = 0
  393. j[y].Parent = m
  394. end end end end
  395.  
  396. q = hum.Parent:GetChildren()
  397. for w = 1,#q do
  398. if (q[w].className == "Hat") then
  399. e = q[w]:GetChildren()
  400. for a = 1,#e do
  401. if (e[a].className == "Part") then
  402. e[a].Anchored = true
  403. e[a].BrickColor = colors[math.random(1, #colors)]
  404. e[a].Friction = .01
  405. e[a].Material = Enum.Material.Ice
  406. e[a].TopSurface = 0
  407. e[a].BottomSurface = 0
  408. e[a].Parent = m
  409. e[a].CFrame = CFrame.new(hum.Parent.Head.Position) + Vector3.new(0, 0.75, 0)
  410. end end end end
  411.  
  412. z = hum.Parent:GetChildren()
  413. for b = 1,#z do
  414. if (z[b].Name == "Head") then
  415. z[b].Anchored = true
  416. z[b].BrickColor = colors[math.random(1, #colors)]
  417. z[b].Friction = .01
  418. if ( math.random() > .5) then
  419. z[b].Material = Enum.Material.Ice
  420. else
  421. z[b].Transparency = .1 + (math.random(1,4) / 10)
  422. end
  423. z[b].TopSurface = 0
  424. z[b].BottomSurface = 0
  425. z[b].Parent = m
  426.  
  427. end end
  428. brick = script.Parent.BrickCleanUp:clone()
  429. brick.Disabled = false
  430. brick.Parent = m
  431. debris:AddItem(m, 90)
  432. end
  433. if (hum == nil) then
  434. script.Parent.Handle.Fail:play()
  435. end
  436. Hit = mouse.hit
  437. local P = Instance.new("Part")
  438. P.Name = "BulletTrail"
  439. local Place0 = script.Parent.Parent["Right Arm"].CFrame
  440. P.formFactor = 0
  441. P.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  442. P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  443. P.Parent = script.Parent.Parent
  444. P.BrickColor = script.Parent.Part1.BrickColor
  445. P.Anchored = true
  446. P.CanCollide = false
  447. m = Instance.new("BlockMesh")
  448. m.Scale = Vector3.new(0.1,0.1,1)
  449. m.Parent = P
  450. for count = 1, 5 do
  451. P.Transparency = count/5
  452. wait()
  453. end
  454. P:remove()
  455. enabled = true
  456. end
  457.  
  458.  
  459.  
  460. function onEquippedLocal(mouse)
  461.  
  462.  
  463.  
  464. if mouse == nil then
  465.  
  466. print("Mouse not found")
  467.  
  468. return
  469.  
  470. end
  471.  
  472.  
  473.  
  474. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  475.  
  476. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  477. end
  478.  
  479.  
  480.  
  481.  
  482.  
  483. Tool.Equipped:connect(onEquippedLocal)
  484.  
  485. end,o39)
  486. end))
  487. o40 = Create("Script",{
  488. ["Name"] = "BrickCleanUp",
  489. ["Parent"] = o1,
  490. ["Disabled"] = true,
  491. })
  492. table.insert(cors,coroutine.create(function()
  493. wait()
  494. runDummyScript(function()
  495. wait(90)
  496. script.Parent:Remove()
  497. end,o40)
  498. end))
  499. mas.Parent = workspace
  500. mas:MakeJoints()
  501. local mas1 = mas:GetChildren()
  502. for i=1,#mas1 do
  503. mas1[i].Parent = game.Players.LocalPlayer.Character
  504. ypcall(function() mas1[i]:MakeJoints() end)
  505. end
  506. mas:Destroy()
  507. for i=1,#cors do
  508. coroutine.resume(cors[i])
  509. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement