Advertisement
mathmasterphil

Bow and arrow [working]

Feb 1st, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.72 KB | None | 0 0
  1. function weld(p0,p1,c0,c1,par)
  2. local w = Instance.new("Weld",p0 or par)
  3. w.Part0 = p0
  4. w.Part1 = p1
  5. w.C0 = c0 or CFrame.new()
  6. w.C1 = c1 or CFrame.new()
  7. return w
  8. end
  9. do -- Credit to Stravant...
  10. local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
  11. local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
  12. local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
  13. function clerp(a,b,t)
  14. if not a or not b then print(a,b,"is missing") return end
  15. local qa = {QuaternionFromCFrame(a)}
  16. local qb = {QuaternionFromCFrame(b)}
  17. local ax, ay, az = a.x, a.y, a.z
  18. local bx, by, bz = b.x, b.y, b.z
  19. local _t = 1-t
  20. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  21. end
  22. end
  23. local oc = oc or function(...) return ... end
  24. pcall(function() script.Parent.bScript:Destroy() end)
  25. script.Name = "bScript"
  26. local plr = game:service'Players'.LocalPlayer
  27. local mouse = plr:GetMouse()
  28. local char = plr.Character
  29. animate = char:findFirstChild("Animate")
  30. animate:Destroy()
  31. local tor,ra,la,rl,ll,hd,hum = char.Torso,char["Right Arm"],char["Left Arm"],char["Right Leg"],char["Left Leg"],char.Head,char.Humanoid
  32. local rrs,rls,nk = tor["Right Shoulder"],tor["Left Shoulder"],tor.Neck
  33. local nk0 = nk.C0
  34. local rc0,rc1 = rrs.C0,rrs.C1
  35. local lc0,lc1 = rls.C0,rls.C0
  36. local rs,ls = rrs:Clone(),rls:Clone()
  37. rs.Name,ls.Name = "rs","ls"
  38. rs.DesiredAngle,rs.CurrentAngle = 0,0
  39. ls.DesiredAngle,ls.CurrentAngle = 0,0
  40. local model = Instance.new("Model",char)
  41. pcall(function() char.bModel:Destroy() end)
  42. model.Name = "bModel"
  43. local part = Instance.new("Part")
  44. part.Material = "SmoothPlastic"
  45. part.BrickColor = BrickColor.new("Royal purple")
  46. part.Reflectance = 0.15
  47. part.FormFactor = "Custom"
  48. part.TopSurface = "SmoothNoOutlines"
  49. part.BottomSurface = "SmoothNoOutlines"
  50. part.RightSurface = "SmoothNoOutlines"
  51. part.LeftSurface = "SmoothNoOutlines"
  52. part.TopSurface,part.BottomSurface = 0,0
  53. part.Size = Vector3.new(.2,.2,.2)
  54. part:BreakJoints()
  55. part.CanCollide = false
  56. function clone(t)
  57. local p = t:Clone()
  58. p.Parent = t.Parent or model
  59. return p
  60. end
  61. local han = clone(part)
  62. han.Size = Vector3.new(.3,.5,.3)
  63. han.Transparency = 1
  64. local hold = weld(la,han,CFrame.new(0,-1,0) * CFrame.Angles(math.rad(-90),math.rad(23),0),CFrame.new())
  65. for i=1,14 do
  66. local gr = clone(part)
  67. gr.BrickColor = BrickColor.new("Black")
  68. gr.Size = Vector3.new(.3,.2,.3)
  69. local m = Instance.new("SpecialMesh",gr)
  70. m.MeshType = "Sphere"
  71. m.Scale = Vector3.new(1,.75,1) * math.max(.85,math.abs(i-7)/5)
  72. weld(han,gr,CFrame.new(0,-.6+i*.085,0) * CFrame.Angles(math.rad(15),math.rad(0),math.rad(23)),CFrame.new())
  73. end
  74. local p = clone(part)
  75. p.Size = Vector3.new(.45,.2,.32)
  76. local m = Instance.new("BlockMesh",p)
  77. m.Scale = Vector3.new(1,.5,1)
  78. weld(han,p,CFrame.new(0,-.62,.125) * CFrame.Angles(math.rad(10),0,0))
  79. local p = clone(part)
  80. p.Size = Vector3.new(.45,.2,.3)
  81. local m = Instance.new("BlockMesh",p)
  82. m.Scale = Vector3.new(1,.5,1)
  83. weld(han,p,CFrame.new(0,-.62,-.125) * CFrame.Angles(math.rad(-10),0,0))
  84. local b1 = clone(part)
  85. b1.Size = Vector3.new(.2,1,.3)
  86. local m = Instance.new("BlockMesh",b1)
  87. m.Scale = Vector3.new(1,1,1)
  88. local bw1 = weld(han,b1,CFrame.new(0,-.6,0) * CFrame.Angles(math.rad(-10),0,0),CFrame.new(0,.5,0))
  89. local b2 = clone(part)
  90. b2.Size = Vector3.new(.2,1,.25)
  91. local m = Instance.new("BlockMesh",b2)
  92. m.Scale = Vector3.new(.9,1,1)
  93. local bw2 = weld(b1,b2,CFrame.new(0,-.5,-.15) * CFrame.Angles(math.rad(-25),0,0),CFrame.new(0,.5,-.125))
  94. local b3 = clone(part)
  95. b3.Size = Vector3.new(.2,1,.2)
  96. local m = Instance.new("BlockMesh",b3)
  97. m.Scale = Vector3.new(.75,1,1)
  98. local bw3 = weld(b2,b3,CFrame.new(0,-.5,-.125) * CFrame.Angles(math.rad(-25),0,0),CFrame.new(0,.5,-.1))
  99. local bt = clone(part)
  100. bt.BrickColor = BrickColor.new("Black")
  101. bt.Size = Vector3.new(.2,.3,.2)
  102. local m = Instance.new("BlockMesh",bt)
  103. m.Scale = Vector3.new(.5,1,1) * .5
  104. local btw = weld(b3,bt,CFrame.new(0,-.5,.1) * CFrame.Angles(math.rad(-25),0,0),CFrame.new(0,0,.05))
  105. local p = clone(part)
  106. p.Size = Vector3.new(.45,.2,.32)
  107. local m = Instance.new("BlockMesh",p)
  108. m.Scale = Vector3.new(1,.5,1)
  109. weld(han,p,CFrame.new(0,.67,.125) * CFrame.Angles(math.rad(15),0,0))
  110. local p = clone(part)
  111. p.Size = Vector3.new(.45,.2,.3)
  112. local m = Instance.new("BlockMesh",p)
  113. m.Scale = Vector3.new(1,.5,1)
  114. weld(han,p,CFrame.new(0,.67,-.125) * CFrame.Angles(math.rad(-15),0,0))
  115. local p = clone(part)
  116. p.Size = Vector3.new(.4,.2,.3)
  117. local m = Instance.new("BlockMesh",p)
  118. m.Scale = Vector3.new(1,.5,1)
  119. weld(han,p,CFrame.new(0,.75,0) * CFrame.Angles(math.rad(0),0,0))
  120. local p = clone(part)
  121. p.Size = Vector3.new(.2,.3,.35)
  122. local m = Instance.new("BlockMesh",p)
  123. m.Scale = Vector3.new(1,1,1)
  124. weld(han,p,CFrame.new(-.1,.8,0) * CFrame.Angles(math.rad(0),0,0))
  125. local p = clone(part)
  126. p.Size = Vector3.new(.45,.2,.32)
  127. local m = Instance.new("BlockMesh",p)
  128. m.Scale = Vector3.new(1,.5,1)
  129. weld(han,p,CFrame.new(0,1,.125) * CFrame.Angles(math.rad(-5),0,0))
  130. local p = clone(part)
  131. p.Size = Vector3.new(.45,.2,.25)
  132. local m = Instance.new("BlockMesh",p)
  133. m.Scale = Vector3.new(1,.5,1)
  134. weld(han,p,CFrame.new(0,1,-.125) * CFrame.Angles(math.rad(5),0,0))
  135. local t1 = clone(part)
  136. t1.Size = Vector3.new(.2,1,.3)
  137. local m = Instance.new("BlockMesh",t1)
  138. m.Scale = Vector3.new(1,1,1)
  139. local tw1 = weld(han,t1,CFrame.new(0,.975,0) * CFrame.Angles(math.rad(10),0,0),CFrame.new(0,-.5,0))
  140. local t2 = clone(part)
  141. t2.Size = Vector3.new(.2,1,.25)
  142. local m = Instance.new("BlockMesh",t2)
  143. m.Scale = Vector3.new(.9,1,1)
  144. local tw2 = weld(t1,t2,CFrame.new(0,.5,-.15) * CFrame.Angles(math.rad(25),0,0),CFrame.new(0,-.5,-.125))
  145. local t3 = clone(part)
  146. t3.Size = Vector3.new(.2,1,.2)
  147. local m = Instance.new("BlockMesh",t3)
  148. m.Scale = Vector3.new(.75,1,1)
  149. local tw3 = weld(t2,t3,CFrame.new(0,.5,-.125) * CFrame.Angles(math.rad(25),0,0),CFrame.new(0,-.5,-.1))
  150. local tt = clone(part)
  151. tt.BrickColor = BrickColor.new("Black")
  152. tt.Size = Vector3.new(.2,.3,.2)
  153. local m = Instance.new("BlockMesh",tt)
  154. m.Scale = Vector3.new(.5,1,1) * .5
  155. local ttw = weld(t3,tt,CFrame.new(0,.5,.1) * CFrame.Angles(math.rad(25),0,0),CFrame.new(0,0,.05))
  156. local W = {bw1,bw2,bw3,tw1,tw2,tw3}
  157. local W0 = {bw1.C0,bw2.C0,bw3.C0,tw1.C0,tw2.C0,tw3.C0}
  158. local l1 = clone(part)
  159. l1.BrickColor = BrickColor.new("Royal purple")
  160. l1.Size = Vector3.new(.2,.2,.2)
  161. local m = Instance.new("CylinderMesh",l1)
  162. local l1w = weld(bt,l1)
  163. local l2 = clone(l1)
  164. local l2w = weld(tt,l2)
  165. local amodel = Instance.new("Model")
  166. local arrow = clone(part)
  167. arrow.Parent = amodel
  168. arrow.BrickColor = BrickColor.new("Black")
  169. arrow.Size = Vector3.new(.2,3,.2)
  170. arrow.Name = "main"
  171. local m = Instance.new("CylinderMesh",arrow)
  172. m.Scale = Vector3.new(.5,1,.5)
  173. local arrw = weld(han,arrow)
  174. local tip = clone(part)
  175. tip.Parent = amodel
  176. tip.BrickColor = BrickColor.new("Royal purple")
  177. tip.Size = Vector3.new(.2,.4,.2)
  178. tip.Name = "tip"
  179. local m = Instance.new("SpecialMesh",tip)
  180. m.MeshId = "rbxassetid://1033714"
  181. m.Scale = Vector3.new(.1,.45,.1)
  182. weld(arrow,tip,CFrame.new(0,1.6,0))
  183. local walkspeed = 16
  184. local hpos_i = CFrame.new(0,.8,1.3)
  185. local hpos_l = CFrame.new(0,.8,1.55)
  186. local hpos = hpos_i
  187. local keeper = Vector3.new(0.07,0.82,0)
  188. mouse.Button1Up:connect(function()
  189. mup = true
  190. end)
  191. function ragJoint(hit,r,d)
  192. Spawn(oc(function()
  193. d = d or 0
  194. local rpar,r0,r1 = r.Parent,r.Part0,r.Part1
  195. if d > 0 then wait(d) end
  196. local p = hit:Clone()
  197. p:BreakJoints()
  198. p:ClearAllChildren()
  199. p.FormFactor = "Custom"
  200. p.Size = p.Size/2
  201. p.Transparency = 1
  202. p.CanCollide = true
  203. p.Name = "Colliduh"
  204. p.Parent = hit
  205. local w = Instance.new("Weld",p)
  206. w.Part0 = hit
  207. w.Part1 = p
  208. w.C0 = CFrame.new(0,-p.Size.Y/2,0)
  209. local rot = Instance.new("Rotate",rpar)
  210. rot.Name = r.Name
  211. rot.Part0 = r0
  212. rot.Part1 = r1
  213. rot.C0 = r.C0
  214. rot.C1 = r.C1
  215. r0.Velocity = Vector3.new()
  216. r1.Velocity = Vector3.new()
  217. r:Destroy()
  218. end))
  219. end
  220. function playSound(id,parent,volume,pitch)
  221. local sound = Instance.new("Sound",parent or workspace)
  222. sound.SoundId = "http://www.roblox.com/asset?id="..id
  223. sound.Volume = volume or 1
  224. sound.Pitch = pitch or 1
  225. coroutine.wrap(function()
  226. wait()
  227. sound:Play()
  228. wait(10)
  229. sound:Stop()
  230. sound:Destroy()
  231. end)()
  232. return sound
  233. end
  234. function ShootArrow(a,to,spd)
  235. playSound(154961548,x,1,1)
  236. Spawn(oc(function()
  237. local from = a.main.CFrame
  238. a:Destroy()
  239. local a = amodel:Clone()
  240. for i,v in pairs(a:GetChildren()) do
  241. if v:IsA("BasePart") then
  242. v.Anchored = true
  243. end
  244. end
  245. a:MakeJoints()
  246. a.Parent = workspace
  247. local m = a.main
  248. --local from = m.CFrame
  249. local t = {}
  250. local function move(cf)
  251. for i,v in pairs(a:GetChildren()) do
  252. if v ~= m and v:IsA("BasePart") then
  253. t[v] = t[v] or m.CFrame:toObjectSpace(v.CFrame)
  254. v.CFrame = cf * t[v]
  255. end
  256. end
  257. m.CFrame = cf
  258. end
  259. move(from)
  260. local velocity = (to.p-from.p).unit * spd * 500
  261. local con
  262. local t = tick()
  263. con = game:GetService("RunService").Stepped:connect(function()
  264. if tick()-t > 25 then
  265. con:disconnect()
  266. a:Destroy()
  267. return
  268. end
  269. velocity = velocity - Vector3.new(0,196.2/30,0)
  270. local newcf = clerp(m.CFrame,CFrame.new(m.Position,m.Position+velocity) * CFrame.Angles(-math.pi/2,0,0),.5) + velocity / 30
  271. local hit,ray
  272. local rayo = Ray.new(m.Position,newcf.p-m.Position)
  273. local ign = {a,char}
  274. repeat
  275. hit,ray = workspace:FindPartOnRayWithIgnoreList(rayo,ign)
  276. if not hit then break end
  277. if hit.CanCollide or game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) then
  278. playSound(154961566,x,1,1)
  279. break
  280. else
  281. table.insert(ign,hit)
  282. hit = nil
  283. end
  284. until false
  285. if hit then
  286. move(newcf-newcf.p+ray)
  287. con:disconnect()
  288. game:GetService("Debris"):AddItem(a,300)
  289. local char = hit.Parent
  290. if not hit.Anchored then
  291. local b = hit.CFrame:toObjectSpace(m.CFrame)
  292. for i,v in pairs(a:GetChildren()) do
  293. pcall(function() v.Anchored = false v.CanCollide = true end)
  294. end
  295. weld(hit,m,b)
  296. end
  297. if game:service'Players':GetPlayerFromCharacter(char) and char:FindFirstChild("Torso") then
  298. if hit.Name:match("Arm") then
  299. local r = char.Torso:FindFirstChild(hit.Name:gsub("Arm","Shoulder"):gsub("Leg","Hip"))
  300. if r then
  301. ragJoint(hit,r)
  302. end
  303. elseif hit.Name:match("Head") then
  304. for i,v in pairs(char:GetChildren()) do
  305. local r = char.Torso:FindFirstChild(v.Name:gsub("Arm","Shoulder"):gsub("Leg","Hip"))
  306. if v:IsA("BasePart") and r then
  307. ragJoint(v,r,.1)
  308. elseif v:IsA("Humanoid") then
  309. v.PlatformStand = true
  310. v.Changed:connect(function()
  311. v.PlatformStand = true
  312. end)
  313. end
  314. end
  315. Delay(8,function()
  316. char:BreakJoints()
  317. end)
  318. end
  319. end
  320. return
  321. else
  322. move(newcf)
  323. end
  324. end)
  325. end))
  326. end
  327. mouse.Button1Down:connect(oc(function()
  328. playSound(154961529,x,1,1)
  329. if mb then return end
  330. mb = true
  331. mup = false
  332. rls.Part0,rls.Part1 = nil,nil
  333. ls.Part0,ls.Part1 = tor,la
  334. ls.Parent = tor
  335. ls.C0 = ls.C0 * CFrame.Angles(0,0,rls.CurrentAngle)
  336. rrs.Part0,rrs.Part1 = nil,nil
  337. rs.Part0,rs.Part1 = tor,ra
  338. rs.Parent = tor
  339. rs.C0 = rs.C0 * CFrame.Angles(0,0,rrs.CurrentAngle)
  340. local hc0 = hold.C0
  341. local bg = Instance.new("BodyGyro",tor)
  342. bg.maxTorque = Vector3.new(1,1,1)*9e7
  343. local ltar = 0
  344. local rtar = rrs.C0 * CFrame.Angles(0,0,math.rad(90)) * CFrame.Angles(math.rad(70),0,0) + Vector3.new(-.65,.25,-.25)
  345. local ntar = nk0 * CFrame.Angles(0,0,math.rad(70))
  346. local htar = hc0 * CFrame.Angles(0,math.rad(10),0)
  347. local t = tick()
  348. local iam = 0
  349. local ham = .3
  350. local lend = false
  351. local ended
  352. local arr = amodel:Clone()
  353. arr.Parent = model
  354. arr:MakeJoints()
  355. hum.WalkSpeed = walkspeed/1.5
  356. local aw = weld(ra,arr.main,CFrame.new(0,-1,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(0,-1.5,0))
  357. func = function()
  358. local a = (mouse.Hit.p-tor.CFrame:toWorldSpace(ls.C0).p).unit
  359. bg.cframe = CFrame.new(tor.Position,mouse.Hit.p*Vector3.new(1,0,1)+tor.Position*Vector3.new(0,1,0)) * CFrame.Angles(0,math.rad(-75),0)
  360. local b = math.min(.7,math.max(-.7,a.Y))
  361. ls.C0 = clerp(ls.C0,rls.C0 * CFrame.Angles(math.rad(-90),math.rad(90),math.rad(b*-90)) * CFrame.Angles(math.rad(40),math.rad(0),0) + Vector3.new(math.abs(b)*0,-.25,-.6),.3)
  362. local c = tor.CFrame:toObjectSpace(han.CFrame*hpos) * CFrame.new(0,0,0)
  363. local d = Vector3.new(1,.6,0)
  364. rs.C1 = CFrame.new()
  365. rs.C0 = clerp(rs.C0,CFrame.new(d,c.p) * CFrame.new(0,0,-(c.p-d).magnitude+.95) * CFrame.Angles(math.pi/2,math.pi/2,0),.3)
  366. nk.C0 = clerp(nk.C0,ntar * CFrame.Angles(math.rad(math.floor(b*-90)),0,0),.3)
  367. hold.C0 = clerp(hold.C0,htar,.3)
  368. for i,v in pairs(W) do
  369. -- v.C0 = clerp(v.C0,W0[i] * CFrame.Angles((not mup and (i>3 and 1 or -1)*iam or 0)*.1,0,0),.6)
  370. v.C0 = clerp(v.C0,W0[i] * CFrame.Angles((not mup and (i>3 and 1 or -1)*iam or 0)*.1,0,0),.6)
  371. end
  372. if not mup then
  373. hpos = clerp(hpos,hpos_l * CFrame.new(0,0,iam),.2)
  374. if aw then aw.C0 = CFrame.new(Vector3.new(0,-1,0),ra.CFrame:toObjectSpace(han.CFrame*CFrame.new(keeper)).p) * CFrame.Angles(-math.pi/2,0,0) end
  375. if tick()-t > .5 and iam < 1 then
  376. iam = iam + math.max(0.003,.03-(tick()-t-.5)/70)
  377. ham = iam
  378. if aw then
  379. aw:Destroy()
  380. arrw.Parent = han
  381. arrw.Part0 = han
  382. arrw.Part1 = arr.main
  383. aw = nil
  384. end
  385. end
  386. else
  387. hpos = clerp(hpos,hpos_l,ham/math.max(0.01,(hpos.p-hpos_l.p).magnitude))
  388. ham = ham * .7
  389. if not ended then
  390. ended = true
  391. if iam > 0 then
  392. arrw.Part1 = nil
  393. ShootArrow(arr,mouse.Hit,iam)
  394. iam = iam + .2
  395. wait(.5)
  396. lend = true
  397. else
  398. wait(.1)
  399. arr:Destroy()
  400. lend = true
  401. end
  402. end
  403. end
  404. end
  405. repeat wait() until lend or tick()-t > 45
  406. mup = nil
  407. func = nil
  408. hum.WalkSpeed = walkspeed
  409. ls.Part0,ls.Part1 = nil,nil
  410. ls.Parent = nil
  411. rls.Part0,rls.Part1 = tor,la
  412. ls.C0 = rls.C0
  413. rs.Part0,rs.Part1 = nil,nil
  414. rs.Parent = nil
  415. rrs.Part0,rrs.Part1 = tor,ra
  416. rs.C0 = rrs.C0
  417. nk.C0 = nk0
  418. bg:Destroy()
  419. hold.C0 = hc0
  420. hpos = hpos_i
  421. mb = false
  422. end))
  423. rcon = game:GetService("RunService").Stepped:connect(oc(function()
  424. if not model:IsDescendantOf(workspace) then rcon:disconnect() error() return end
  425. --local tc = bt.CFrame:toObjectSpace(tt.CFrame)
  426. --local bc = tt.CFrame:toObjectSpace(bt.CFrame)
  427. local bm = bt.CFrame:toObjectSpace(han.CFrame*hpos)
  428. local tm = tt.CFrame:toObjectSpace(han.CFrame*hpos)
  429. l1w.C0 = CFrame.new(bm.p/2,bm.p) * CFrame.Angles(math.pi/2,0,0)
  430. l1.Mesh.Scale = Vector3.new(.2,bm.p.magnitude*5,.2)
  431. l2w.C0 = CFrame.new(tm.p/2,tm.p) * CFrame.Angles(math.pi/2,0,0)
  432. l2.Mesh.Scale = Vector3.new(.2,tm.p.magnitude*5,.2)
  433. arrw.C0 = CFrame.new(hpos.p,keeper)*CFrame.new(0,0,-arrow.Size.Y/2) * CFrame.Angles(-math.pi/2,0,0)
  434. if func then
  435. func()
  436. end
  437. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement