Advertisement
frog2128

cake recipe

Mar 10th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.19 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. Humanoid = Character.Humanoid
  8. LeftArm = Character["Left Arm"]
  9. LeftLeg = Character["Left Leg"]
  10. RightArm = Character["Right Arm"]
  11. RightLeg = Character["Right Leg"]
  12. LS = Torso["Left Shoulder"]
  13. LH = Torso["Left Hip"]
  14. RS = Torso["Right Shoulder"]
  15. RH = Torso["Right Hip"]
  16. Neck = Torso.Neck
  17. it=Instance.new
  18. vt=Vector3.new
  19. cf=CFrame.new
  20. euler=CFrame.fromEulerAnglesXYZ
  21. angles=CFrame.Angles
  22.  
  23. function swait(num)
  24. if num==0 or num==nil then
  25. game:service'RunService'.RenderStepped:wait()
  26. else
  27. for i=0,num do
  28. game:service'RunService'.RenderStepped:wait()
  29. end
  30. end
  31. end
  32.  
  33. if Character:findFirstChild("SwordBall",true) ~= nil then
  34. Character:findFirstChild("SwordBall",true).Parent = nil
  35. end
  36.  
  37. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  38. local fp = it("Part")
  39. fp.formFactor = formfactor
  40. fp.Parent = parent
  41. fp.Reflectance = reflectance
  42. fp.Transparency = transparency
  43. fp.CanCollide = false
  44. fp.Locked=true
  45. fp.BrickColor = brickcolor
  46. fp.Name = name
  47. fp.Size = size
  48. fp.Position = Torso.Position
  49. fp.BottomSurface="Smooth"
  50. fp.TopSurface="Smooth"
  51. fp:BreakJoints()
  52. return fp
  53. end
  54.  
  55. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  56. local mesh = it(Mesh)
  57. mesh.Parent = part
  58. if Mesh=="SpecialMesh" then
  59. mesh.MeshType = meshtype
  60. mesh.MeshId = meshid
  61. end
  62. mesh.Offset=offset
  63. mesh.Scale=scale
  64. return mesh
  65. end
  66.  
  67. function weld(parent,part0,part1,c0)
  68. local weld = it("Weld")
  69. weld.Parent = parent
  70. weld.Part0 = part0
  71. weld.Part1 = part1
  72. weld.C0 = c0
  73. return weld
  74. end
  75.  
  76. showDamage=function(Char,Dealt,du,Color)
  77. m=Instance.new("Model")
  78. m.Name=tostring(Dealt)
  79. h=Instance.new("Humanoid")
  80. h.Health=0
  81. h.MaxHealth=0
  82. h.Parent=m
  83. c=Instance.new("Part")
  84. c.Transparency=0
  85. c.BrickColor=Color
  86. c.Name="Head"
  87. c.TopSurface=0
  88. c.BottomSurface=0
  89. c.formFactor="Plate"
  90. c.Size=Vector3.new(1,.4,1)
  91. ms=Instance.new("CylinderMesh")
  92. ms.Scale=Vector3.new(.8,.8,.8)
  93. if CRIT==true then
  94. ms.Scale=Vector3.new(1,1.25,1)
  95. end
  96. ms.Parent=c
  97. c.Reflectance=0
  98. Instance.new("BodyGyro").Parent=c
  99. c.Parent=m
  100. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  101. f=Instance.new("BodyPosition")
  102. f.P=2000
  103. f.D=100
  104. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  105. f.position=c.Position+Vector3.new(0,3,0)
  106. f.Parent=c
  107. game:GetService("Debris"):AddItem(m,.5+du)
  108. c.CanCollide=false
  109. m.Parent=workspace
  110. c.CanCollide=false
  111. end
  112.  
  113. local swordball=Instance.new("Model")
  114. swordball.Parent=Character
  115. swordball.Name="SwordBall"
  116. local proppart=part(1,swordball,0,1,BrickColor.new("Black"),"Derp",vt(1,1,1))
  117. local sou=Instance.new("Sound")
  118. sou.Parent=proppart
  119. sou.Volume=1
  120. sou.Pitch=1
  121. sou.SoundId="http://www.roblox.com/asset/?id=168589016"
  122. sou.Looped=true
  123. --sou:play()
  124.  
  125. local propwld=weld(proppart,proppart,Torso,euler(0,0,0)*cf(0,-9,0))
  126.  
  127. local prt1=part(3,swordball,0,1,BrickColor:Random(),"BallRef",vt(2,2,2))
  128. local prt2=part(3,swordball,0,0,BrickColor:Random(),"Ball",vt(1,1,1))
  129.  
  130. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(3,3,3))
  131.  
  132. local wld2=weld(prt2,prt2,prt1,cf(0,0,0)*euler(0,0,0))
  133. coroutine.resume(coroutine.create(function(Weld,Part)
  134. derp=0
  135. while Part.Parent~=nil do
  136. swait()
  137. wld2.C0=euler(0,derp,0)
  138. derp=derp+0.1
  139. end
  140. end),wld2,prt2)
  141.  
  142. numb=0
  143. numb2=0
  144. for i=1,8 do
  145. for i=1,8 do
  146. local prt3=part(3,swordball,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
  147. local msh3=mesh("SpecialMesh",prt3,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.05,0.05,0.05))
  148. --http://www.roblox.com/asset/?id=1029523
  149. local wld3=weld(prt3,prt3,prt2,cf(0,0,2.5)*euler(numb,numb2,numb2))
  150. numb=numb+0.785
  151. end
  152. numb2=numb2+0.785
  153. end
  154.  
  155. prop=Instance.new("RocketPropulsion")
  156. prop.MaxSpeed=5000
  157. prop.CartoonFactor=0
  158. prop.MaxThrust=100000
  159. prop.Parent=prt2
  160. prop.Target=proppart
  161. prop.ThrustD=1.5
  162. prop.TurnD=0
  163. prop.TurnP=0
  164. prop:Fire()
  165.  
  166. --[[velp=Instance.new("BodyGyro")
  167. velp.Parent=prt1
  168. velp.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
  169. velp.P=20e+003
  170. velp.cframe=cf(0,0,0)
  171. coroutine.resume(coroutine.create(function(Velo,Part)
  172. while Part.Parent~=nil do
  173. for i=0,1,0.1 do
  174. swait()
  175. Velo.cframe=Velo.cframe*euler(0,3.14*i,0)
  176. end
  177. end
  178. end),velp,sprt)]]
  179. --[[wait(5)
  180. local sou=Instance.new("Sound")
  181. sou.Parent=prt1
  182. sou.Volume=1
  183. sou.Pitch=1
  184. sou.SoundId="rbxasset://sounds\\unsheath.wav"
  185. sou.Looped=true
  186. wait()
  187. sou:play() ]]
  188. while true do
  189. swait(200)
  190. for d=1,1 do
  191. for _,c in pairs(workspace:children()) do
  192. local hum=c:findFirstChild("Humanoid")
  193. if hum~=nil then
  194. local head=c:findFirstChild("Torso")
  195. if head~=nil then
  196. local targ=head.Position-prt1.Position
  197. local mag=targ.magnitude
  198. if mag<=10000 and c.Name~=Player.Name then
  199. local sprt=part(3,workspace,0,1,BrickColor:Random(),"Sword",vt(6,6,6))
  200. local sprt2=part(3,workspace,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
  201. local smsh=mesh("SpecialMesh",sprt2,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.1,0.1,0.1))
  202. local swld=weld(sprt2,sprt2,sprt,euler(0,0,0))
  203. local teh=0
  204. game:GetService("Debris"):AddItem(sprt,20)
  205. game:GetService("Debris"):AddItem(sprt2,20)
  206. coroutine.resume(coroutine.create(function(Weld,Part)
  207. numb1=0
  208. while Part.Parent~=nil do
  209. swait()
  210. Part.BrickColor=BrickColor:Random()
  211. Weld.C0=Weld.C0*angles(0,numb1,0)
  212. numb1=math.pi/math.random(10,20)
  213. end
  214. end),swld,sprt2)
  215. sprt.CFrame=prt1.CFrame
  216. sprt.Velocity=vt(-math.random(20,50),math.random(20,50),-math.random(20,50))
  217. --[[if d==1 then
  218. sprt.Velocity=vt(math.random(50,200),math.random(20,50),0)
  219. elseif d==2 then
  220. sprt.Velocity=vt(-math.random(50,200),math.random(20,50),0)
  221. elseif d==3 then
  222. sprt.Velocity=vt(0,math.random(20,50),math.random(50,200))
  223. elseif d==4 then
  224. sprt.Velocity=vt(0,math.random(20,50),-math.random(50,200))
  225. end]]
  226. local sou=Instance.new("Sound")
  227. sou.Parent=sprt
  228. sou.Volume=1
  229. sou.Pitch=1
  230. --sou.SoundId="http://www.roblox.com/asset/?id=166545328"
  231. sou.SoundId="http://www.roblox.com/asset/?id=168589016"
  232. sou.SoundId="http://www.roblox.com/asset/?id=163306929" --swahmp
  233. sou.SoundId="http://www.roblox.com/asset/?id=138109980" --DON'T LOSE YOUR WAAAAAAAAAY
  234. coroutine.resume(coroutine.create(function(Thing,dur)
  235. while true do
  236. wait()
  237. if math.random(1,2)==1 then
  238. dur=math.random()/math.random(10,20)
  239. else
  240. dur=-math.random()/math.random(10,20)
  241. end
  242. if Thing.Pitch>1.5 then
  243. dur=-math.random()/math.random(25,50)
  244. elseif Thing.Pitch<0.1 then
  245. dur=math.random()/math.random(25,50)
  246. end
  247. for i=0,1,0.1 do
  248. wait()
  249. Thing.Pitch=Thing.Pitch+dur
  250. end
  251. end
  252. end),sou,1)
  253. sou.Looped=true
  254. sou:play()
  255. prop=Instance.new("RocketPropulsion")
  256. prop.MaxSpeed=50000
  257. prop.CartoonFactor=0
  258. prop.MaxThrust=100000
  259. prop.Parent=sprt
  260. prop.Target=head
  261. --[[prop.TurnD=0
  262. prop.TurnP=100]]
  263. prop:Fire()
  264. con1=sprt.Touched:connect(function(hit)
  265. if hit.Parent==nil then
  266. return
  267. end
  268. h=hit.Parent:FindFirstChild("Humanoid")
  269. for _,v in pairs(hit.Parent:children()) do
  270. if v:IsA("Humanoid") then
  271. h=v
  272. end
  273. end
  274. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  275. if h.Health~=0 then
  276. sprt.Parent=nil
  277. sprt2.Parent=nil
  278. --[[damage=math.random(999999,99999999)
  279. h:TakeDamage(damage)
  280. hit:BreakJoints()
  281. hit.Anchored=false
  282. hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  283. showDamage(h.Parent,damage,1,BrickColor.new("Bright red"))]]
  284. --[[local sou=Instance.new("Sound")
  285. sou.Parent=hit
  286. sou.Volume=1
  287. sou.Pitch=1
  288. sou.SoundId="http://www.roblox.com/asset/?id=168009623"
  289. sou.Looped=false
  290. sou:play() ]]
  291. end
  292. elseif --[[hit.Name~="Base" and]] hit.Parent~=swordball and hit.Parent.Name~=Character.Name and hit.Name~="Sword" then
  293. --hit:BreakJoints()
  294. --hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
  295. --hit.Anchored=false
  296. hit.BrickColor=BrickColor.new(Color3.new(math.random(),math.random(),math.random()))
  297. end
  298. end)
  299. end
  300. end
  301. end
  302. end
  303. end
  304. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement