Advertisement
Dinosaurus

MADEBYDINORARESCRIPT

Jun 17th, 2016
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.51 KB | None | 0 0
  1. plyr = game:GetService("Players").LocalPlayer
  2. --password
  3. plyr.Character["Right Arm"].TopSurface = "Smooth"
  4. plyr.Character["Right Arm"].BottomSurface = "Smooth"
  5. plyr.Character["Left Arm"].TopSurface = "Smooth"
  6. plyr.Character["Left Arm"].BottomSurface = "Smooth"
  7. DrillOut = false
  8. BattleEnd = false
  9. EDmg = math.random(10,20)
  10. EOn = false
  11. Spinning = false
  12. SpinDeb = false
  13. LineColor = "Yellow"
  14. Shocks = false
  15. ShockDeb = false
  16. mod = Instance.new("Model")
  17. mod.Name = "TDrills"
  18. mod.Parent = plyr.Character
  19. welds = Instance.new("Model")
  20. welds.Name = "NotSparta(But close!)"
  21. welds.Parent = mod
  22. Lines = Instance.new("Model")
  23. Lines.Name = "Lines :>"
  24. Lines.Parent = mod
  25. function createPart(size,color,parent)
  26. Part = Instance.new("Part")
  27. Part.Size = size
  28. Part.BrickColor = BrickColor.new(color)
  29. Part.Parent = parent
  30. Part.TopSurface = "Smooth"
  31. Part.BottomSurface = "Smooth"
  32. Part.formFactor = "Symmetric"
  33. Part.CanCollide = false
  34. Part.Locked = true
  35. end
  36. function createMesh(type1,type2,scale,parent)
  37. if type1 == "Block" then
  38. Mesh = Instance.new("BlockMesh")
  39. Mesh.Scale = scale
  40. Mesh.Parent = parent
  41. elseif type1 == "Special" then
  42. Mesh = Instance.new("SpecialMesh")
  43. Mesh.MeshType = type2
  44. Mesh.Scale = scale
  45. Mesh.Parent = parent
  46. elseif type1 == "Cylinder" then
  47. Mesh = Instance.new("CylinderMesh")
  48. Mesh.Scale = scale
  49. Mesh.Parent = parent
  50. end
  51. end
  52. function createWeld(part0,part1,c0)
  53. Weld = Instance.new("Weld")
  54. Weld.Parent = welds
  55. Weld.Part0 = part0
  56. Weld.Part1 = part1
  57. Weld.C0 = c0
  58. end
  59. function setJoint(which)
  60. if which == "Right" then
  61. RightArmJoint.Parent = nil
  62. RightArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  63. RightArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  64. elseif which == "Left" then
  65. LeftArmJoint.Parent = nil
  66. LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  67. LeftArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  68. elseif which == "Both" then
  69. RightArmJoint.Parent = nil
  70. LeftArmJoint.Parent = nil
  71. RightArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  72. RightArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  73. LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  74. LeftArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  75. end
  76. end
  77. function backArms()
  78. NiceWeldRight.C0 = CFrame.new(-1.5,-0.6,0)*CFrame.Angles(0,0,0)
  79. NiceWeldLeft.C0 = CFrame.new(1.5,-0.6,0)*CFrame.Angles(0,0,0)
  80. RightArmJoint.Parent = plyr.Character["Right Arm"]
  81. RightArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-40),math.rad(-20),math.rad(5))
  82. LeftArmJoint.Parent = plyr.Character["Left Arm"]
  83. LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-40),math.rad(20),math.rad(-5))
  84. end
  85. function armOut(which)
  86. if which == "Right" then
  87. RightArmJoint.Parent = plyr.Character["Right Arm"]
  88. RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  89. elseif which == "Left" then
  90. LeftArmJoint.Parent = plyr.Character["Left Arm"]
  91. LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  92. end
  93. end
  94. function effect1(thing)
  95. for i,v in pairs(Lines:GetChildren()) do
  96. v:Remove()
  97. end
  98. e1 = true
  99. pos1 = thing.Position
  100. what = thing
  101. pos2 = pos1
  102. end
  103. function effect2(thing)
  104. e1 = true
  105. posz1 = thing.Position
  106. what2 = thing
  107. posz2 = posz1
  108. end
  109. function addShock()
  110. createPart(Vector3.new(1,1,1),"Bright yellow",mod)
  111. RightShock = Part
  112. RightShock.Transparency = 0.7
  113. RightShock.Reflectance = 0
  114. createMesh("Special","Brick",Vector3.new(0.3,1.2,0.3),Part)
  115. Mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  116. createWeld(Part,RightDrill,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  117. createPart(Vector3.new(1,1,1),"Bright yellow",mod)
  118. LeftShock = Part
  119. LeftShock.Transparency = 0.7
  120. LeftShock.Reflectance = 0
  121. createMesh("Special","Brick",Vector3.new(0.3,1.2,0.3),Part)
  122. Mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  123. createWeld(Part,LeftDrill,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  124. LineColor = "Bright yellow"
  125. Shocks = true
  126. function STouch(part)
  127. if math.random(1,5) == 5 and ShockDeb == false then
  128. print("STUNNED!")
  129. if part.Parent:findFirstChild("Humanoid") ~= nil then
  130. ShockDeb = true
  131. pcall(function()
  132. part.Parent.Humanoid.WalkSpeed = 0
  133. part.Parent.Torso.Anchored = true
  134. end)
  135. wait(2)
  136. pcall(function()
  137. part.Parent.Humanoid.WalkSpeed = 16
  138. part.Parent.Torso.Anchored = false
  139. end)
  140. ShockDeb = false
  141. end
  142. end
  143. end
  144. function onTouch(hit) STouch(hit) end RightShock.Touched:connect(onTouch)
  145. function onTouch(hit) STouch(hit) end LeftShock.Touched:connect(onTouch)
  146. end
  147. function removeShock()
  148. pcall(function()
  149. RightShock:Destroy()
  150. LeftShock:Destroy()
  151. end)
  152. LineColor = "Dark stone grey"
  153. Shocks = false
  154. end
  155. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  156. RightHandle = Part
  157. createMesh("Cylinder","Brick",Vector3.new(0.5,0.05,0.5),Part)
  158. createWeld(Part,plyr.Character["Right Arm"],CFrame.new(0,1,0)*CFrame.Angles(0,0,0))
  159. createPart(Vector3.new(1,1,1),"Dark stone grey",mod)
  160. RightDrill = Part
  161. RightDrill.Reflectance = 0.2
  162. createMesh("Special","Brick",Vector3.new(0.2,1,0.2),Part)
  163. Mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  164. createWeld(Part,RightHandle,CFrame.new(0,0.4,0)*CFrame.Angles(math.rad(180),0,0))
  165. RDWeld = Weld
  166. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  167. LeftHandle = Part
  168. createMesh("Cylinder","Brick",Vector3.new(0.5,0.05,0.5),Part)
  169. createWeld(Part,plyr.Character["Left Arm"],CFrame.new(0,1,0)*CFrame.Angles(0,0,0))
  170. createPart(Vector3.new(1,1,1),"Dark stone grey",mod)
  171. LeftDrill = Part
  172. LeftDrill.Reflectance = 0.2
  173. createMesh("Special","Brick",Vector3.new(0.2,1,0.2),Part)
  174. Mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  175. createWeld(Part,LeftHandle,CFrame.new(0,0.4,0)*CFrame.Angles(math.rad(180),0,0))
  176. LDWeld = Weld
  177. --Joints
  178. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  179. RAJ = Part
  180. RAJ.Transparency = 1
  181. createMesh("Block","Brick",Vector3.new(0.2,0.2,0.2),Part)
  182. createWeld(Part,plyr.Character.Torso,CFrame.new(-1.5,-0.6,0)*CFrame.Angles(0,0,0))
  183. NiceWeldRight = Weld
  184. createWeld(plyr.Character["Right Arm"],RAJ,CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0))
  185. RightArmJoint = Weld
  186. RightArmJoint.Parent = nil
  187. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  188. LAJ = Part
  189. LAJ.Transparency = 1
  190. createMesh("Block","Brick",Vector3.new(0.2,0.2,0.2),Part)
  191. createWeld(Part,plyr.Character.Torso,CFrame.new(1.5,-0.6,0)*CFrame.Angles(0,0,0))
  192. NiceWeldLeft = Weld
  193. createWeld(plyr.Character["Left Arm"],LAJ,CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0))
  194. LeftArmJoint = Weld
  195. LeftArmJoint.Parent = nil
  196. --JointEnd
  197. if script.Parent.className ~= "HopperBin" then
  198. hb = Instance.new("HopperBin")
  199. hb.Parent = plyr.Backpack
  200. hb.Name = "TDrills"
  201. script.Parent = hb
  202. end
  203. hb = script.Parent
  204. debounce = false
  205. function Select(mouse)
  206. BattleEnd = false
  207. mod.Parent = plyr.Character
  208. welds:MakeJoints()
  209. backArms()
  210. function onKeyDown(key)
  211. if debounce == false then debounce = true
  212. key:lower()
  213. -----------
  214. if string.byte(key) == 113 and Spinning == false then
  215. if DrillOut == false then
  216. DrillOut = true
  217. for i = 1,10 do
  218. RDWeld.C0 = RDWeld.C0 - Vector3.new(0,0.08,0)
  219. LDWeld.C0 = LDWeld.C0 - Vector3.new(0,0.08,0)
  220. wait()
  221. end
  222. effect1(RightDrill)
  223. effect2(LeftDrill)
  224. else
  225. e1 = false
  226. for i = 1,10 do
  227. RDWeld.C0 = RDWeld.C0 + Vector3.new(0,0.08,0)
  228. LDWeld.C0 = LDWeld.C0 + Vector3.new(0,0.08,0)
  229. wait()
  230. end
  231. DrillOut = false
  232. end
  233. --Teleport----------------------
  234. elseif string.byte(key) == 116 then
  235. if (plyr.Character.Torso.Position-mouse.Hit.p).magnitude < 2000 then
  236. e1 = false
  237. for i,v in pairs(Lines:GetChildren()) do
  238. v:Remove()
  239. end
  240. pos1 = plyr.Character.Torso.Position
  241. plyr.Character:MoveTo(mouse.Hit.p)
  242. wait()
  243. pos2 = plyr.Character.Torso.Position
  244. createPart(Vector3.new(1,1,1),"Dark stone grey",workspace)
  245. Partz = Part
  246. Partz.Name = "Line"
  247. Partz.Anchored = true
  248. Partz.Size = Vector3.new(1,(pos1-pos2).magnitude,1)
  249. Partz.CFrame = CFrame.new((pos1+pos2)/2,pos1)*CFrame.Angles(math.pi/2,0,0)
  250. createMesh("Cylinder","Brick",Vector3.new(0.5,1,0.5),Partz)
  251. wait()
  252. for i = 1,10 do
  253. pcall(function()
  254. Partz.Transparency = Partz.Transparency + 0.05
  255. end)
  256. wait()
  257. end
  258. game:getService("Debris"):AddItem(Partz,0.1)
  259. effect1(RightDrill)
  260. effect2(LeftDrill)
  261. end
  262. end
  263. if DrillOut == true then
  264. if string.byte(key) == 101 and Spinning == false then
  265. if math.random(1,2) == 1 then
  266. EOn = true
  267. function onTouch(hit)
  268. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  269. if EOn == true then
  270. EOn = false
  271. hit.Parent.Humanoid:TakeDamage(EDmg)
  272. wait(0.5)
  273. EOn = true
  274. end
  275. end
  276. end
  277. RightDrill.Touched:connect(onTouch)
  278. backArms()
  279. for i = 1,5 do
  280. RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(30),0,0)
  281. wait()
  282. end
  283. for i = 1,5 do
  284. RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0)
  285. wait()
  286. end
  287. EOn = false
  288. else
  289. EOn = true
  290. function onTouch(hit)
  291. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  292. if EOn == true then
  293. EOn = false
  294. hit.Parent.Humanoid:TakeDamage(EDmg)
  295. wait(0.5)
  296. EOn = true
  297. end
  298. end
  299. end
  300. LeftDrill.Touched:connect(onTouch)
  301. backArms()
  302. for i = 1,5 do
  303. LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(30),0,0)
  304. wait()
  305. end
  306. for i = 1,5 do
  307. LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0)
  308. wait()
  309. end
  310. EOn = false
  311. end
  312. --Spin win--------------
  313. elseif string.byte(key) == 114 then
  314. backArms()
  315. if Spinning == false then
  316. SpinDeb = true
  317. SpinT = true
  318. for i = 1,10 do
  319. RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(4),math.rad(2),math.rad(-0.5))
  320. LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(4),math.rad(-2),math.rad(0.5))
  321. wait()
  322. end
  323. for i = 1,10 do
  324. RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,math.rad(8.5))
  325. LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,math.rad(-8.5))
  326. wait()
  327. end
  328. NiceWeldRight.C0 = NiceWeldRight.C0 + Vector3.new(0.1,0,0)
  329. NiceWeldLeft.C0 = NiceWeldLeft.C0 - Vector3.new(0.1,0,0)
  330. function onTouch(hit)
  331. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  332. if SpinT == true then
  333. SpinT = false
  334. hit.Parent.Humanoid:TakeDamage(EDmg)
  335. wait(0.1)
  336. SpinT = true
  337. end
  338. end
  339. end
  340. LeftDrill.Touched:connect(onTouch)
  341. function onTouch(hit)
  342. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  343. if SpinT == true then
  344. SpinT = false
  345. hit.Parent.Humanoid:TakeDamage(EDmg)
  346. wait(0.1)
  347. SpinT = true
  348. end
  349. end
  350. end
  351. RightDrill.Touched:connect(onTouch)
  352. Spinning = true
  353. SpinDeb = false
  354. plyr.Character.Humanoid.WalkSpeed = 25
  355. else
  356. SpinT = false
  357. plyr.Character.Humanoid.WalkSpeed = 16
  358. Spinning = false
  359. end
  360. elseif string.byte(key) == 122 then
  361. if Shocks == false then
  362. addShock()
  363. else
  364. removeShock()
  365. end
  366. ---------
  367. end
  368. end
  369. EOn = false
  370. debounce = false
  371. end
  372. end
  373. mouse.KeyDown:connect(onKeyDown)
  374. end
  375. hb.Selected:connect(Select)
  376. function onDeselect(mouse)
  377. pcall(function()
  378. if DrillOut == true then
  379. for i = 1,10 do
  380. RDWeld.C0 = RDWeld.C0 + Vector3.new(0,0.08,0)
  381. LDWeld.C0 = LDWeld.C0 + Vector3.new(0,0.08,0)
  382. end
  383. end
  384. DrillOut = false
  385. BattleEnd = true
  386. EOn = false
  387. e1 = false
  388. Spinning = false
  389. setJoint("Both")
  390. SpinT = false
  391. plyr.Character.TLua.Humanoid.WalkSpeed = 16
  392. end)
  393. end
  394. hb.Deselected:connect(onDeselect)
  395. coroutine.resume(coroutine.create(function()
  396. while true do
  397. if Spinning then
  398. plyr.Character.Torso.CFrame = plyr.Character.Torso.CFrame*CFrame.fromEulerAnglesXYZ(0,math.rad(60),0)
  399. end
  400. wait()
  401. end
  402. end
  403. )
  404. )
  405. coroutine.resume(coroutine.create(function()
  406. for i = 1,math.huge do
  407. if e1 then
  408. posz1 = what2.Position
  409. createPart(Vector3.new(1,1,1),LineColor,Lines)
  410. Partz = Part
  411. Partz.Name = "LineD" .. i
  412. Partz.Transparency = 0
  413. Partz.Anchored = true
  414. Partz.Size = Vector3.new(1,(posz1-posz2).magnitude,1)
  415. Partz.CFrame = CFrame.new((posz1+posz2)/2,posz1)*CFrame.Angles(math.pi/2,0,0)
  416. createMesh("Cylinder","Brick",Vector3.new(0.2,1,0.2),Partz)
  417. delay(0,function()
  418. for iz = 0 , 1 , 0.1 do
  419. wait()
  420. Lines["LineD" .. i].Transparency = 1*iz
  421. end
  422. game:getService("Debris"):AddItem(Partz)
  423. end)
  424. posz2 = posz1
  425. end
  426. wait()
  427. end
  428. end
  429. )
  430. )
  431.  
  432. coroutine.resume(coroutine.create(function()
  433. for i = 1,math.huge do
  434. if e1 then
  435. pos1 = what.Position
  436. createPart(Vector3.new(1,1,1),LineColor,Lines)
  437. Partz = Part
  438. Partz.Name = "Line" .. i
  439. Partz.Transparency = 0
  440. Partz.Anchored = true
  441. Partz.Size = Vector3.new(1,(pos1-pos2).magnitude,1)
  442. Partz.CFrame = CFrame.new((pos1+pos2)/2,pos1)*CFrame.Angles(math.pi/2,0,0)
  443. createMesh("Cylinder","Brick",Vector3.new(0.2,1,0.2),Partz)
  444. delay(0,function()
  445. for iz = 0 , 1 , 0.1 do
  446. wait()
  447. Lines["Line" .. i].Transparency = 1*iz
  448. end
  449. game:getService("Debris"):AddItem(Partz)
  450. end)
  451. pos2 = pos1
  452. end
  453. wait()
  454. end
  455. end
  456. )
  457. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement