Advertisement
Treyzotic

not fininsihed

Mar 25th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.67 KB | None | 0 0
  1. function Weld2()
  2. local w = Instance.new("Weld")
  3. w.Part0 = game.Workspace.epiclightining.hood
  4. w.Part1 = game.Workspace.epiclightining.Head
  5. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  6. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
  7. w.Parent = game.Workspace
  8. local w = Instance.new("Weld")
  9. w.Part0 = game.Workspace.epiclightining.staff
  10. w.Part1 = game.Workspace.epiclightining["Right Arm"]
  11. w.C0 = CFrame.fromEulerAnglesXYZ(-1.8, 0, 0) * CFrame.new(0, .3, 3) --First CFrame is rotation, second Cframe is where it goes.
  12. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
  13. w.Parent = game.Workspace
  14. local w = Instance.new("Weld")
  15. w.Part0 = game.Workspace.epiclightining.Ham
  16. w.Part1 = game.Workspace.epiclightining.staff
  17. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 3, 0) --First CFrame is rotation, second Cframe is where it goes.
  18. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of thetime)
  19. w.Parent = script.Parent
  20. local f = Instance.new("Weld")
  21. f.Part0 = game.Workspace.epiclightining.Ham
  22. f.Part1 = game.Workspace.epiclightining.top
  23. f.C0 = CFrame.fromEulerAnglesXYZ(1.6, 0, 0) * CFrame.new(0, -1.8, -0) --First CFrame is rotation, second Cframe is where it goes.
  24. f.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
  25. f.Parent = script.Parent
  26. local f = Instance.new("Weld")
  27. f.Part0 = game.Workspace.epiclightining.Ham
  28. f.Part1 = game.Workspace.epiclightining.bot
  29. f.C0 = CFrame.fromEulerAnglesXYZ(1.6, 0, 0) * CFrame.new(0, 1.8, -0) --First CFrame is rotation, second Cframe is where it goes.
  30. f.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the time)
  31. f.Parent = game.Workspace
  32. end
  33. wait(2)
  34. Player1x = game.Players.epiclightining
  35. run = game:GetService("RunService")
  36. local MyMouse = game.Players.LocalPlayer:GetMouse()
  37. MyMouse.KeyDown:connect(function(key)
  38. if string.lower(key) == "e" then
  39. r = game.Workspace
  40. local k = game.Workspace.epiclightining
  41. local a = game.Workspace.epiclightining.Torso
  42. local function Weld()
  43. local w = Instance.new("Weld")
  44. w.Part0 = game.Workspace.epiclightining.Torso.Part1
  45. w.Part1 = game.Workspace.epiclightining.Torso
  46. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  47. w.C1 = CFrame.fromEulerAnglesXYZ(0, -.5, 4) * CFrame.new(-2.5, 0, .6) --This is the second brick (the one you want to move most of the time)
  48. w.Parent = r
  49. local w = Instance.new("Weld")
  50. w.Part0 = game.Workspace.epiclightining.Torso.Part
  51. w.Part1 = game.Workspace.epiclightining.Torso.Part1
  52. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  53. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, -1.5) * CFrame.new(-2, -2, 0) --This is the second brick (the one you want to move most of the time)
  54. w.Parent = r
  55. local w = Instance.new("Weld")
  56. w.Part0 = game.Workspace.epiclightining.Torso.Part2
  57. w.Part1 = game.Workspace.epiclightining.Torso
  58. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  59. w.C1 = CFrame.fromEulerAnglesXYZ(0, .5, -4) * CFrame.new(2.5, 0, .6) --This is the second brick (the one you want to move most of the time)
  60. w.Parent = r
  61. local w = Instance.new("Weld")
  62. w.Part0 = game.Workspace.epiclightining.Torso.Part2
  63. w.Part1 = game.Workspace.epiclightining.Torso.Part3
  64. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  65. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 1.6) * CFrame.new(-1.9, -1.9, 0) --This is the second brick (the one you want to move most of the time)
  66. w.Parent = r
  67. end
  68. local b = Instance.new("Part", a)
  69. b.Name = "Part"
  70. b.BrickColor = BrickColor.Black()
  71. local c = Instance.new("BlockMesh", b)
  72. c.Scale = Vector3.new(1, 0.3, 0.2)
  73. local d = Instance.new("Part", a)
  74. d.Name = "Part1"
  75. d.BrickColor = BrickColor.Black()
  76. local e = Instance.new("BlockMesh", d)
  77. e.Scale = Vector3.new(1, 0.3, 0.2)
  78. local f = Instance.new("Part", a)
  79. f.Name = "Part2"
  80. f.BrickColor = BrickColor.Black()
  81. local g = Instance.new("BlockMesh", f)
  82. g.Scale = Vector3.new(1, 0.3, 0.2)
  83. local h = Instance.new("Part", a)
  84. h.Name = "Part3"
  85. h.BrickColor = BrickColor.Black()
  86. local i = Instance.new("BlockMesh", h)
  87. i.Scale = Vector3.new(1, 0.3, 0.2)
  88. local z = Instance.new("Part", game.Workspace.epiclightining)
  89. z.Name = "hood"
  90. local q = Instance.new("SpecialMesh", z)
  91. q.MeshType = 9
  92. q.MeshId = "http://www.roblox.com/asset/?id=16150814"
  93. q.TextureId = "http://www.roblox.com/asset/?id=35651952"
  94. local a = Instance.new("Part", game.Workspace.epiclightining)
  95. a.Name = "staff"
  96. a.Shape = "Cylinder"
  97. a.BrickColor = BrickColor.Blue()
  98. a.CanCollide = false
  99. local o = Instance.new("CylinderMesh", a)
  100. o.Scale = Vector3.new(1, 2, 0.05)
  101. local v = Instance.new("Part", k)
  102. v.Name = "Ham"
  103. local u = Instance.new("BlockMesh", v)
  104. u.Scale = Vector3.new(0.5, 2, 2)
  105. local g = Instance.new("Part", k)
  106. g.Name = "top"
  107. local h = Instance.new("BlockMesh", g)
  108. h.Scale = Vector3.new(0.7, 0.5, 1.5)
  109. local s = Instance.new("Part", k)
  110. s.Name = "bot"
  111. local w = Instance.new("BlockMesh", s)
  112. w.Scale = Vector3.new(0.7, 0.5, 1.5)
  113. Weld()
  114. wait(.5)
  115. Weld2()
  116. if string.lower(key) == "e" then
  117. local power = 5
  118. wait()
  119. bin = script.Parent
  120. bpos = Instance.new("BodyPosition")
  121. gyro = Instance.new("BodyGyro")
  122. gyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  123. bpos.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  124. fly = false
  125. player = game.Players.LocalPlayer
  126. char = player.Character.Torso
  127. airborne = false
  128.  
  129. function onButton1Down(mouse)
  130. fly = true
  131. while fly do
  132. pos = mouse.Hit.p
  133. --gyro.cframe = CFrame.new(char.Position,pos)
  134. bpos.position = char.Position + (pos-char.Position).unit * power
  135. wait()
  136. end
  137. end
  138.  
  139. function onMove(mouse)
  140. pos = mouse.Hit.p
  141. gyro.cframe = CFrame.new(char.Position,pos) * CFrame.fromEulerAnglesXYZ(-3.14/2+1.2,0,0)
  142. --bpos.position = char.Position +
  143. --wait()
  144. --end
  145. end
  146.  
  147. function onButton1Up(mouse)
  148. fly = false
  149. end
  150.  
  151. function onSelected(mouse)
  152. print("select")
  153. if mouse == nil then
  154. return
  155. end
  156. airborne = true
  157. bpos.Parent = char
  158. bpos.position = char.Position + Vector3.new(0,1,0)
  159. gyro.Parent = char
  160.  
  161. if char.Parent.Humanoid.Sit == true then
  162. char.Parent.Humanoid.Sit = false
  163. wait(.05)
  164. char.Parent.Humanoid.Sit = true
  165. end
  166.  
  167. char.Parent.Humanoid.Sit = true ---
  168. mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
  169. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  170. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  171. mouse.Move:connect(function() onMove(mouse) end)
  172.  
  173. for i, v in ipairs(char:GetChildren()) do
  174. if v.className == "Motor" then
  175. v.MaxVelocity = 0
  176. v.CurrentAngle = -1
  177. if v.Name == "Left Hip" then
  178. v.CurrentAngle = 1
  179. end
  180. end
  181. end
  182. end
  183.  
  184. function onDeselected(mouse)
  185. print("deselect")
  186. gyro.Parent = nil
  187. fly = false
  188. airborne = false
  189. for i, v in ipairs(char:GetChildren()) do
  190. if v.className == "Motor" then
  191. v.MaxVelocity = 1
  192. end
  193. end
  194. char.Parent.Humanoid.Sit = false ---
  195. for i = 1, 30 do
  196. if not airborne then
  197. --bpos.position = bpos.position - Vector3.new(0,0,0)
  198. wait(0.01)
  199. end
  200. end
  201. if not airborne then
  202. bpos.Parent = nil
  203. end
  204. end
  205.  
  206.  
  207. bin.Selected:connect(onSelected)
  208. bin.Deselected:connect(onDeselected)
  209. end
  210. end
  211. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement