Advertisement
DaOMEGAa32

pamtri santiago

Oct 20th, 2019
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.83 KB | None | 0 0
  1. local s = Instance.new("Sound")
  2.  
  3. s.Name = "pamtri"
  4. s.SoundId = "rbxassetid://1031137209"
  5. s.Volume = 4
  6. s.Looped = true
  7. s.archivable = false
  8.  
  9. s.Parent = game.Workspace
  10.  
  11. wait(0.2)
  12.  
  13. s:play()
  14. local Plr = game.Players.LocalPlayer
  15. local PChar = Plr.Character
  16. local plr = game:GetService("Players").LocalPlayer
  17. local char = plr.Character
  18.  
  19. function FindInTable(t, n)
  20. for i,v in pairs(t) do
  21. if v == n then
  22. return true
  23. end
  24. end
  25. return false
  26. end
  27. --Transformaaaaation--
  28. char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
  29. char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
  30. char.Head.BrickColor = BrickColor.new("Pastel brown")
  31. char["Left Leg"].BrickColor = BrickColor.new("Pastel brown")
  32. char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
  33.  
  34. for i,v in pairs(char:children'') do
  35. local toremove = {"CharacterMesh", "Shirt", "Pants", "ShirtGraphic", "Accessory"}
  36. if FindInTable(toremove, v.ClassName) then v:Destroy() end
  37. if v.ClassName == "BodyColors" then
  38. v.HeadColor = BrickColor.new("Lily white")
  39. v.LeftArmColor = BrickColor.new("Lily white")
  40. v.LeftLegColor = BrickColor.new("Lily white")
  41. v.RightArmColor = BrickColor.new("Lily white")
  42. v.RightLegColor = BrickColor.new("Lily white")
  43. v.TorsoColor = BrickColor.new("Lily white")
  44. end
  45. end
  46.  
  47. local face = char.Head:FindFirstChild'face' if face then face.Texture = "http://www.roblox.com/asset/?id=329939455" end
  48. Instance.new("Shirt", char).ShirtTemplate = "http://www.roblox.com/asset/?id=216962370"
  49. Instance.new("Pants", char).PantsTemplate = "http://www.roblox.com/asset/?id=382537568"
  50. local function CreateHat(name, meshid, textureid)
  51. local h = Instance.new("Accessory")
  52. h.Name = name
  53. local han = Instance.new("Part", h)
  54. han.Name = "Handle"
  55. local mesh = Instance.new("SpecialMesh", han)
  56. mesh.Name = "Mesh"
  57. mesh.MeshId = meshid
  58. mesh.TextureId = textureid
  59. return h,han,mesh
  60. end
  61. hum = char:FindFirstChildOfClass'Humanoid'
  62. local h,han,mesh = CreateHat("2LEGITOwl", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
  63. han.Size = Vector3.new(1, 1, 1)
  64. mesh.Scale = Vector3.new(0.3, 0.3, 0.3)
  65. h.AttachmentPos = Vector3.new(1.1, 0.38, 0)
  66. hum:AddAccessory(h)
  67. h,han,mesh = CreateHat("RobloxScarf", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
  68. mesh.Scale = Vector3.new(3, 3, 3)
  69. han.Size = Vector3.new(1.9, 2, 2)
  70. h.AttachmentPos = Vector3.new(0, 1.54, 0.1)
  71. hum:AddAccessory(h)
  72. h,han,mesh = CreateHat("Beautiful Hair for Purple People", "http://www.roblox.com/asset/?id=87529", "http://www.roblox.com/asset/?id=1768566787623956")
  73. mesh.Scale = Vector3.new(1.05, 1.05, 1.05)
  74. han.Size = Vector3.new(2, 2, 2)
  75. hum:AddAccessory(h)
  76. --a function--
  77. function Say(text)
  78. local head = char.Head
  79. local fh = head:Clone()
  80. fh:ClearAllChildren()
  81. fh.Transparency = 1
  82. local bg = Instance.new("BillboardGui", fh)
  83. bg.Size = UDim2.new(6, 0, 6, 0)
  84. bg.StudsOffset = Vector3.new(0, 3, 0)
  85. local f = Instance.new("Frame", bg)
  86. f.Size = UDim2.new(1, 0, 1, 0)
  87. f.BackgroundTransparency = 1
  88. local tl = Instance.new("TextLabel", f)
  89. tl.BackgroundTransparency = 1
  90. tl.Size = UDim2.new(5, 0, 1, 0)
  91. tl.Position = UDim2.new(-2, 0, 0)
  92. tl.TextColor3 = Color3.new(1, 1, 1)
  93. tl.TextScaled = true
  94. tl.Text = ""
  95. tl.TextColor3 = BrickColor.new("Really black").Color
  96. tl.Font = Enum.Font.Fantasy
  97. tl.TextSize = 120
  98. fh.Parent = Instance.new("Model", plr.Character)
  99. local Joint = Instance.new("Weld", game.JointsService)
  100. Joint.Part0 = head
  101. Joint.Part1 = fh
  102.  
  103. local letters = {}
  104. text:gsub(".",function(c) table.insert(letters,c) end)
  105. for i,v in pairs(letters) do
  106. tl.Text = tl.Text .. tostring(v)
  107. wait(1/20)
  108. end
  109. wait(1)
  110. fh.Parent:Destroy()
  111. end
  112.  
  113. function ReloadChat() --hax
  114. local chat = plr:FindFirstChildOfClass'PlayerGui':FindFirstChild'SB_Chat'
  115. if chat then
  116. chat:Destroy()
  117. end
  118. plr.PlayerScripts.ChatScript:Destroy()
  119. game:GetService("Chat").ChatScript:Clone().Parent = plr.PlayerScripts
  120. plr:FindFirstChildOfClass'PlayerGui':WaitForChild'Chat'.Name = "SB_Chat"
  121. end
  122. local s = Instance.new("Sound")
  123.  
  124. s.Name = "pamtri"
  125. s.SoundId = "rbxassetid://874084114"
  126. s.Volume = 7
  127. s.Looped = false
  128. s.archivable = false
  129.  
  130. s.Parent = game.Workspace
  131.  
  132. wait(0.2)
  133.  
  134. s:play()
  135.  
  136. --Converted with ttyyuu12345's model to script plugin v4
  137. function sandbox(var,func)
  138. local env = getfenv(func)
  139. local newenv = setmetatable({},{
  140. __index = function(self,k)
  141. if k=="script" then
  142. return var
  143. else
  144. return env[k]
  145. end
  146. end,
  147. })
  148. setfenv(func,newenv)
  149. return func
  150. end
  151. cors = {}
  152. mas = Instance.new("Model",game:GetService("Lighting"))
  153. Tool0 = Instance.new("Tool")
  154. LocalScript1 = Instance.new("LocalScript")
  155. NumberValue2 = Instance.new("NumberValue")
  156. LocalScript3 = Instance.new("LocalScript")
  157. Script4 = Instance.new("Script")
  158. Script5 = Instance.new("Script")
  159. Part6 = Instance.new("Part")
  160. Sound7 = Instance.new("Sound")
  161. Sound8 = Instance.new("Sound")
  162. Sound9 = Instance.new("Sound")
  163. Part10 = Instance.new("Part")
  164. Tool0.Name = "Pamtri Gun -(6)"
  165. Tool0.Parent = mas
  166. Tool0.Grip = CFrame.new(0, 0, 0, -0.0050099371, 0, 0.999987423, 0, 1, 0, -0.999987423, 0, -0.0050099371)
  167. Tool0.GripForward = Vector3.new(-0.999987423, -0, 0.0050099371)
  168. Tool0.GripRight = Vector3.new(-0.0050099371, 0, -0.999987423)
  169. LocalScript1.Name = "Local Gui"
  170. LocalScript1.Parent = Tool0
  171. table.insert(cors,sandbox(LocalScript1,function()
  172. -------------------------------------Gun info
  173. ToolName="Pamtri Gun"
  174.  
  175. ClipSize=6
  176. ReloadTime=3
  177. Firerate=.40
  178. MinSpread=0
  179. MaxSpread=0
  180. SpreadRate=0
  181. BaseDamage=100
  182. automatic=false
  183. burst=false
  184. shot=true --Shotgun
  185. BarrlePos=Vector3.new(-2.20,.60,0)
  186. Cursors={"rbxasset://textures\\GunCursor.png"}
  187. ReloadCursor="rbxasset://textures\\GunWaitCursor.png"
  188. -------------------------------------
  189. equiped=false
  190. sp=script.Parent
  191. RayLength=1000
  192. Spread=0
  193. enabled=true
  194. reloading=false
  195. down=false
  196. r=game:service("RunService")
  197. last=0
  198. last2=0
  199. last3=0
  200. last4=0
  201. last5=0
  202. last6=0
  203.  
  204. Bullet=Instance.new("Part")
  205. Bullet.Name="Bullet"
  206. Bullet.BrickColor=BrickColor.new("New Yeller")
  207. Bullet.Anchored=true
  208. Bullet.CanCollide=false
  209. Bullet.Locked=true
  210. Bullet.Size=Vector3.new(1,1,1)
  211. --Bullet.Transparency=.65
  212. Bullet.formFactor=0
  213. Bullet.TopSurface=0
  214. Bullet.BottomSurface=0
  215. mesh=Instance.new("SpecialMesh")
  216. mesh.Parent=Bullet
  217. mesh.MeshType="Brick"
  218. mesh.Name="Mesh"
  219. mesh.Scale=Vector3.new(.15,.15,1)
  220.  
  221. function check()
  222. sp.Name=ToolName.."-("..tostring(sp.Ammo.Value)..")"
  223. end
  224.  
  225. function computeDirection(vec)
  226. local lenSquared = vec.magnitude * vec.magnitude
  227. local invSqrt = 1 / math.sqrt(lenSquared)
  228. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  229. end
  230.  
  231. ------------------------------------------------------------------------------------Raycasting functions
  232. function cross(vector1, vector2)
  233. return Vector3.new(vector1.y * vector2.z - vector2.y * vector1.z, vector1.z * vector2.x - vector1.x * vector2.z, vector1.x * vector2.y - vector2.x * vector1.y)
  234. end
  235. function dot(vector1, vector2)
  236. return (vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z)
  237. end
  238. function getLineSphereCollide(linePoint1, lineVector, sphereCenter, radius)
  239. local a = lineVector.x * lineVector.x + lineVector.y * lineVector.y + lineVector.z * lineVector.z
  240. local b = lineVector.x * (linePoint1.x - sphereCenter.x) + lineVector.y * (linePoint1.y - sphereCenter.y) + lineVector.z * (linePoint1.z - sphereCenter.z)
  241. local c = (linePoint1.x - sphereCenter.x) * (linePoint1.x - sphereCenter.x) + (linePoint1.y - sphereCenter.y) * (linePoint1.y - sphereCenter.y) + (linePoint1.z - sphereCenter.z) * (linePoint1.z - sphereCenter.z) - radius * radius
  242. if (a > 0) and (b * b >= a * c) then
  243. local diff = math.sqrt(b * b - a * c)
  244. return ((-b - diff) / a), ((diff - b) / a)
  245. else
  246. return -1, -1
  247. end
  248. end
  249. --Returns hit, position, normal, time
  250. function raycast(model, start, vector, brickFunction)
  251. local hit, normal, time = raycastRecursive(model, start, vector, brickFunction, vector.unit, dot(start, vector.unit))
  252. if (dot(normal, vector) > 0) then
  253. normal = -normal
  254. end
  255. return hit, start + time * vector, normal.unit, time
  256. end
  257. function raycastRecursive(model, start, vector, brickFunction, unitVec, startDist)
  258. if (model.className == "Part") or (model.className == "Seat") or (model.className =="SpawnLocation") then
  259. local range = model.Size.magnitude / 2
  260. local dist = dot(model.Position, unitVec) - startDist
  261. if (dist + range > 0) and (dist - range < vector.magnitude) and ((dist * unitVec + start - model.Position).magnitude < range) and brickFunction(model) then
  262. local halfSize = model.Size / 2
  263. if (model.Shape == Enum.PartType.Ball) then
  264. local time, timeMax = getLineSphereCollide(start, vector, model.Position, halfSize.x)
  265. if (time < 1) and (time >= 0) then
  266. return model, (time * vector + start - model.Position), time
  267. else
  268. return nil, Vector3.new(0, 0, 0), 1
  269. end
  270. elseif (model.Shape == Enum.PartType.Block) then
  271. local time = 1
  272. local cf = model.CFrame - model.Position
  273. local xvec = cf * Vector3.new(1, 0, 0)
  274. local yvec = cf * Vector3.new(0, 1, 0)
  275. local zvec = cf * Vector3.new(0, 0, 1)
  276. local xspd = -dot(xvec, vector)
  277. local yspd = -dot(yvec, vector)
  278. local zspd = -dot(zvec, vector)
  279. local xmin, xmax, ymin, ymax, zmin, zmax = -1
  280. local dotProd = dot(xvec, start - model.Position)
  281. if (xspd ~= 0) then
  282. xmin = (dotProd - halfSize.x) / xspd
  283. xmax = (dotProd + halfSize.x) / xspd
  284. if (xmax < xmin) then
  285. local swap = xmin
  286. xmin = xmax
  287. xmax = swap
  288. end
  289. else
  290. if (math.abs(dotProd) < halfSize.x) then
  291. xmax = 1
  292. xmin = 0
  293. else
  294. return nil, Vector3.new(0, 0, 0), 1
  295. end
  296. end
  297. local dotProd = dot(yvec, start - model.Position)
  298. if (yspd ~= 0) then
  299. ymin = (dotProd - halfSize.y) / yspd
  300. ymax = (dotProd + halfSize.y) / yspd
  301. if (ymax < ymin) then
  302. local swap = ymin
  303. ymin = ymax
  304. ymax = swap
  305. end
  306. else
  307. if (math.abs(dotProd) < halfSize.y) then
  308. ymax = 1
  309. ymin = 0
  310. else
  311. return nil, Vector3.new(0, 0, 0), 1
  312. end
  313. end
  314. local dotProd = dot(zvec, start - model.Position)
  315. if (zspd ~= 0) then
  316. zmin = (dotProd - halfSize.z) / zspd
  317. zmax = (dotProd + halfSize.z) / zspd
  318. if (zmax < zmin) then
  319. local swap = zmin
  320. zmin = zmax
  321. zmax = swap
  322. end
  323. else
  324. if (math.abs(dotProd) < halfSize.z) then
  325. zmax = 1
  326. zmin = 0
  327. else
  328. return nil, Vector3.new(0, 0, 0), 1
  329. end
  330. end
  331. if (xmin <= ymax) and (xmax >= ymin) and (xmin <= zmax) and (xmax >= zmin) and (zmin <= ymax) and (zmax >= ymin) then
  332. local normal = xvec
  333. local min = xmin
  334. if (ymin > min) then
  335. min = ymin
  336. normal = yvec
  337. end
  338. if (zmin > min) then
  339. min = zmin
  340. normal = zvec
  341. end
  342. if (min >= 0) and (min < 1) then
  343. time = min
  344. elseif (xmax > 0) and (ymax > 0) and (zmax > 0) and (min < 0) then
  345. time = 0
  346. normal = Vector3.new(0, 0, 0)
  347. end
  348. return model, normal, time
  349. else
  350. return nil, Vector3.new(0, 0, 0), 1
  351. end
  352. else -- Cylinder
  353. local time = 1
  354. local cf = model.CFrame - model.Position
  355. local xvec = cf * Vector3.new(1, 0, 0)
  356. local xspd = -dot(xvec, vector)
  357. local xmin, xmax = -1
  358. local dotProd = dot(xvec, start - model.Position)
  359. if (xspd ~= 0) then
  360. xmin = (dotProd - halfSize.x) / xspd
  361. xmax = (dotProd + halfSize.x) / xspd
  362. if (xmax < xmin) then
  363. local swap = xmin
  364. xmin = xmax
  365. xmax = swap
  366. end
  367. else
  368. if (math.abs(dotProd) < halfSize.x) then
  369. xmax = 1
  370. xmin = 0
  371. else
  372. return nil, Vector3.new(0, 0, 0), 1
  373. end
  374. end
  375.  
  376. local relVec = cf:pointToObjectSpace(vector) * Vector3.new(0, 1, 1)
  377. local relPos = model.CFrame:pointToObjectSpace(start) * Vector3.new(0, 1, 1)
  378. local rmin, rmax = getLineSphereCollide(relPos, relVec, Vector3.new(0, 0, 0), halfSize.y)
  379. if (xmin <= rmax) and (xmax >= rmin) and (rmax > 0) then
  380. local normal = xvec
  381. local min = xmin
  382. if (rmin > min) then
  383. min = rmin
  384. normal = cf * (relPos + relVec * min)
  385. end
  386. if (min >= 0) and (min < 1) then
  387. time = min
  388. elseif (xmax > 0) and (rmax > 0) and (min < 0) then
  389. time = 0
  390. normal = Vector3.new(0, 0, 0)
  391. end
  392. return model, normal, time
  393. else
  394. return nil, Vector3.new(0, 0, 0), 1
  395. end
  396. return nil, Vector3.new(0, 0, 0), 1
  397. end
  398. end
  399. return nil, Vector3.new(0, 0, 0), 1
  400. elseif (model.className=="Model") or (model.className=="Workspace") or (model.className=="Hat") or (model.className == "Tool") then
  401. local children=model:GetChildren()
  402. local time=1
  403. local normal=Vector3.new(0, 0, 0)
  404. local hit=nil
  405. for n = 1, #children do
  406. if children[n]~= nil then
  407. local newHit, newNormal, newTime = raycastRecursive(children[n], start, vector, brickFunction, unitVec, startDist)
  408. if (newTime < time) then
  409. time = newTime
  410. hit = newHit
  411. normal = newNormal
  412. end
  413. end
  414. end
  415. return hit, normal, time
  416. else
  417. return nil, Vector3.new(0, 0, 0), 1
  418. end
  419. end
  420. -------------------------------------------------------------------------------
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427. function tagHumanoid(humanoid)
  428. local plr=game.Players:playerFromCharacter(sp.Parent)
  429. if plr~=nil then
  430. local tag=Instance.new("ObjectValue")
  431. tag.Value=plr
  432. tag.Name="creator"
  433. tag.Parent=humanoid
  434. delay(2,function()
  435. if tag~=nil then
  436. tag.Parent=nil
  437. end
  438. end)
  439. end
  440. end
  441.  
  442.  
  443. function reload(mouse)
  444. reloading=true
  445. mouse.Icon=ReloadCursor
  446. while sp.Ammo.Value<ClipSize and reloading and enabled do
  447. wait(ReloadTime/ClipSize)
  448. if reloading then
  449. sp.Ammo.Value=sp.Ammo.Value+1
  450. check()
  451. else
  452. break
  453. end
  454. end
  455. check()
  456. mouse.Icon=Cursors[1]
  457. reloading=false
  458. end
  459.  
  460. function onKeyDown(key,mouse)
  461. key=key:lower()
  462. if key=="r" and not reloading then
  463. reload(mouse)
  464. end
  465. end
  466.  
  467. function movecframe(p,pos)
  468. p.Parent=game.Lighting
  469. p.Position=pos
  470. p.Parent=game.Workspace
  471. end
  472.  
  473.  
  474. function fire(aim)
  475. sp.Handle.Fire:Play()
  476.  
  477. t=r.Stepped:wait()
  478. last6=last5
  479. last5=last4
  480. last4=last3
  481. last3=last2
  482. last2=last
  483. last=t
  484.  
  485. local bullet=Bullet:clone()
  486. local totalDist=0
  487. Lengthdist=-RayLength/.5
  488. local startpoint=sp.Handle.CFrame*BarrlePos
  489. local dir=(aim)-startpoint
  490. dir=computeDirection(dir)
  491. local cfrm=CFrame.new(startpoint, dir+startpoint)
  492. local hit,pos,normal,time=raycast(game.Workspace, startpoint, cfrm*Vector3.new(0,0,Lengthdist)-startpoint, function(brick)
  493. if brick.Name=="Glass" then
  494. return true
  495. elseif brick.Name=="Bullet" or brick.Name=="BulletTexture" then
  496. return false
  497. elseif brick:IsDescendantOf(sp.Parent) then
  498. return false
  499. elseif brick.Name=="Handle" then
  500. if brick.Parent:IsDescendantOf(sp.Parent) then
  501. return false
  502. else
  503. return true
  504. end
  505. end
  506. return true
  507. end)
  508. bullet.Parent=game.Workspace
  509. if hit~=nil then
  510. local humanoid=hit.Parent:FindFirstChild("Humanoid")
  511. if humanoid~=nil then
  512. local damage=math.random(BaseDamage-(BaseDamage*.25),BaseDamage+(BaseDamage*.25))
  513. if hit.Name=="Head" then
  514. damage=damage*1.3
  515. elseif hit.Name=="Torso" then
  516. else
  517. damage=damage*.75
  518. end
  519. if humanoid.Health>0 then
  520. local eplr=game.Players:playerFromCharacter(humanoid.Parent)
  521. local plr=game.Players:playerFromCharacter(sp.Parent)
  522. if eplr~=nil and plr~=nil then
  523. -- if eplr.TeamColor~=plr.TeamColor or eplr.Neutral or plr.Neutral then
  524. tagHumanoid(humanoid)
  525. humanoid:TakeDamage(damage)
  526. -- end
  527. else
  528. tagHumanoid(humanoid)
  529. humanoid:TakeDamage(damage)
  530. end
  531. end
  532. end
  533. if (hit.Name == "Part10") or (hit.Name == "Part11") or (hit.Name == "Part21") or (hit.Name == "Part23") or (hit.Name == "Part24") or (hit.Name == "Part8") then
  534. rand = math.random(1,5)
  535. if rand == 3 then
  536. workspace.GlassSound:play()
  537. hit:breakJoints()
  538. end
  539. end
  540. if (hit.Parent:findFirstChild("Hit")) then
  541. hit.Parent.Health.Value = hit.Parent.Health.Value - BaseDamage/3
  542. end
  543. distance=(startpoint-pos).magnitude
  544. bullet.CFrame=cfrm*CFrame.new(0,0,-distance/2)
  545. bullet.Mesh.Scale=Vector3.new(.15,.15,distance)
  546. else
  547. bullet.CFrame=cfrm*CFrame.new(0,0,-RayLength/2)
  548. bullet.Mesh.Scale=Vector3.new(.15,.15,RayLength)
  549. end
  550. if pos~=nil then
  551. end
  552. local deb=game:FindFirstChild("Debris")
  553. if deb==nil then
  554. local debris=Instance.new("Debris")
  555. debris.Parent=game
  556. end
  557. check()
  558. game.Debris:AddItem(bullet,.05)
  559. end
  560.  
  561. function onButton1Up(mouse)
  562. down=false
  563. end
  564.  
  565. function onButton1Down(mouse)
  566. h=sp.Parent:FindFirstChild("Humanoid")
  567. if not enabled or reloading or down or h==nil then
  568. return
  569. end
  570. if sp.Ammo.Value>0 and h.Health>0 then
  571. --[[if sp.Ammo.Value<=0 then
  572. if not reloading then
  573. reload(mouse)
  574. end
  575. return
  576. end]]
  577. down=true
  578. enabled=false
  579. while down do
  580. if sp.Ammo.Value<=0 then
  581. break
  582. end
  583. if burst then
  584. local startpoint=sp.Handle.CFrame*BarrlePos
  585. local mag=(mouse.Hit.p-startpoint).magnitude
  586. local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
  587. fire(mouse.Hit.p+rndm)
  588. sp.Ammo.Value=sp.Ammo.Value-1
  589. if sp.Ammo.Value<=0 then
  590. break
  591. end
  592. wait(.05)
  593. local startpoint=sp.Handle.CFrame*BarrlePos
  594. local mag2=((mouse.Hit.p+rndm)-startpoint).magnitude
  595. local rndm2=Vector3.new(math.random(-(.1/10)*mag2,(.1/10)*mag2),math.random(-(.1/10)*mag2,(.1/10)*mag2),math.random(-(.1/10)*mag2,(.1/10)*mag2))
  596. fire(mouse.Hit.p+rndm+rndm2)
  597. sp.Ammo.Value=sp.Ammo.Value-1
  598. if sp.Ammo.Value<=0 then
  599. break
  600. end
  601. wait(.05)
  602. fire(mouse.Hit.p+rndm+rndm2+rndm2)
  603. sp.Ammo.Value=sp.Ammo.Value-1
  604. elseif shot then
  605. sp.Ammo.Value=sp.Ammo.Value-1
  606. local startpoint=sp.Handle.CFrame*BarrlePos
  607. local mag=(mouse.Hit.p-startpoint).magnitude
  608. local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
  609. fire(mouse.Hit.p+rndm)
  610. local mag2=((mouse.Hit.p+rndm)-startpoint).magnitude
  611. local rndm2=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
  612. fire(mouse.Hit.p+rndm+rndm2)
  613. local rndm3=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
  614. fire(mouse.Hit.p+rndm+rndm3)
  615. local rndm4=Vector3.new(math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2),math.random(-(.2/10)*mag2,(.2/10)*mag2))
  616. fire(mouse.Hit.p+rndm+rndm4)
  617. else
  618. sp.Ammo.Value=sp.Ammo.Value-1
  619. local startpoint=sp.Handle.CFrame*BarrlePos
  620. local mag=(mouse.Hit.p-startpoint).magnitude
  621. local rndm=Vector3.new(math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag),math.random(-(Spread/10)*mag,(Spread/10)*mag))
  622. fire(mouse.Hit.p+rndm)
  623. end
  624. wait(Firerate)
  625. if not automatic then
  626. break
  627. end
  628. end
  629. enabled=true
  630. else
  631. sp.Handle.Trigger:Play()
  632. end
  633. end
  634.  
  635. function onEquippedLocal(mouse)
  636. if mouse==nil then
  637. print("Mouse not found")
  638. return
  639. end
  640. mouse.Icon=Cursors[1]
  641. mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  642. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  643. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  644. check()
  645. equiped=true
  646. if #Cursors>1 then
  647. while equiped do
  648. t=r.Stepped:wait()
  649. local action=sp.Parent:FindFirstChild("Pose")
  650. if action~=nil then
  651. if sp.Parent.Pose.Value=="Standing" then
  652. Spread=MinSpread
  653. else
  654. Spread=MinSpread+((4/10)*(MaxSpread-MinSpread))
  655. end
  656. else
  657. Spread=MinSpread
  658. end
  659. if t-last<SpreadRate then
  660. Spread=Spread+.1*(MaxSpread-MinSpread)
  661. end
  662. if t-last2<SpreadRate then
  663. Spread=Spread+.1*(MaxSpread-MinSpread)
  664. end
  665. if t-last3<SpreadRate then
  666. Spread=Spread+.1*(MaxSpread-MinSpread)
  667. end
  668. if t-last4<SpreadRate then
  669. Spread=Spread+.1*(MaxSpread-MinSpread)
  670. end
  671. if t-last5<SpreadRate then
  672. Spread=Spread+.1*(MaxSpread-MinSpread)
  673. end
  674. if t-last6<SpreadRate then
  675. Spread=Spread+.1*(MaxSpread-MinSpread)
  676. end
  677. if not reloading then
  678. local percent=(Spread-MinSpread)/(MaxSpread-MinSpread)
  679. for i=0,#Cursors-1 do
  680. if percent>(i/(#Cursors-1))-((1/(#Cursors-1))/2) and percent<(i/(#Cursors-1))+((1/(#Cursors-1))/2) then
  681. mouse.Icon=Cursors[i+1]
  682. end
  683. end
  684. end
  685. wait(Firerate*.9)
  686. end
  687. end
  688. end
  689. function onUnequippedLocal(mouse)
  690. equiped=false
  691. reloading=false
  692. end
  693. sp.Equipped:connect(onEquippedLocal)
  694. sp.Unequipped:connect(onUnequippedLocal)
  695. check()
  696. end))
  697. NumberValue2.Name = "Ammo"
  698. NumberValue2.Parent = Tool0
  699. NumberValue2.Value = 6
  700. LocalScript3.Name = "BackupWeld"
  701. LocalScript3.Parent = Tool0
  702. table.insert(cors,sandbox(LocalScript3,function()
  703. function Weld(x,y)
  704. local W = Instance.new("Weld")
  705. W.Part0 = x
  706. W.Part1 = y
  707. local CJ = CFrame.new(x.Position)
  708. local C0 = x.CFrame:inverse()*CJ
  709. local C1 = y.CFrame:inverse()*CJ
  710. W.C0 = C0
  711. W.C1 = C1
  712. W.Parent = x
  713. end
  714.  
  715. function Get(A)
  716. if A.className == "Part" then
  717. Weld(script.Parent.Handle, A)
  718. A.Anchored = false
  719. else
  720. local C = A:GetChildren()
  721. for i=1, #C do
  722. Get(C[i])
  723. end
  724. end
  725. end
  726.  
  727. function Finale()
  728. Get(script.Parent)
  729. end
  730.  
  731. script.Parent.Equipped:connect(Finale)
  732. script.Parent.Unequipped:connect(Finale)
  733. Finale()
  734. end))
  735. Script4.Name = "Welding"
  736. Script4.Parent = Tool0
  737. table.insert(cors,sandbox(Script4,function()
  738. function Weld(x,y)
  739. local W = Instance.new("Weld")
  740. W.Part0 = x
  741. W.Part1 = y
  742. local CJ = CFrame.new(x.Position)
  743. local C0 = x.CFrame:inverse()*CJ
  744. local C1 = y.CFrame:inverse()*CJ
  745. W.C0 = C0
  746. W.C1 = C1
  747. W.Parent = x
  748. end
  749.  
  750. function Get(A)
  751. if A.className == "Part" then
  752. Weld(script.Parent.Handle, A)
  753. A.Anchored = false
  754. else
  755. local C = A:GetChildren()
  756. for i=1, #C do
  757. Get(C[i])
  758. end
  759. end
  760. end
  761.  
  762. function Finale()
  763. Get(script.Parent)
  764. end
  765.  
  766. script.Parent.Equipped:connect(Finale)
  767. script.Parent.Unequipped:connect(Finale)
  768. Finale()
  769. end))
  770. Script5.Name = "SandwichScript"
  771. Script5.Parent = Tool0
  772. table.insert(cors,sandbox(Script5,function()
  773. local Tool = script.Parent;
  774.  
  775. function onEquipped()
  776. Tool.Handle.OpenSound:play()
  777. end
  778.  
  779. script.Parent.Equipped:connect(onEquipped)
  780.  
  781. end))
  782. Part6.Name = "Handle"
  783. Part6.Parent = Tool0
  784. Part6.CFrame = CFrame.new(2.15507817, 0.635000944, 7.03725863, 0.0523361303, 0, -0.998629212, 0, 1, 0, 0.998629212, 0, 0.0523361303)
  785. Part6.Orientation = Vector3.new(0, -87, 0)
  786. Part6.Position = Vector3.new(2.15507817, 0.635000944, 7.03725863)
  787. Part6.Rotation = Vector3.new(0, -87, 0)
  788. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  789. Part6.Size = Vector3.new(0.5, 0.729999959, 0.5)
  790. Part6.BottomSurface = Enum.SurfaceType.Smooth
  791. Part6.BrickColor = BrickColor.new("Really black")
  792. Part6.Material = Enum.Material.SmoothPlastic
  793. Part6.TopSurface = Enum.SurfaceType.Smooth
  794. Part6.brickColor = BrickColor.new("Really black")
  795. Sound7.Name = "Fire"
  796. Sound7.Parent = Part6
  797. Sound7.Pitch = 0.89999997615814
  798. Sound7.PlaybackSpeed = 0.89999997615814
  799. Sound7.SoundId = "http://roblox.com/asset/?id=10209859"
  800. Sound7.Volume = 1
  801. Sound8.Name = "OpenSound"
  802. Sound8.Parent = Part6
  803. Sound8.SoundId = "rbxassetid://874084114"
  804. Sound8.Volume = 1
  805. Sound9.Name = "Trigger"
  806. Sound9.Parent = Part6
  807. Sound9.SoundId = "rbxasset://sounds//switch.wav"
  808. Sound9.Volume = 0.75
  809. Part10.Parent = Tool0
  810. Part10.CFrame = CFrame.new(2.12550807, 1.25000095, 6.47303295, 0.0523361452, 0, -0.998629451, 0, 1, 0, 0.998629451, 0, 0.0523361452)
  811. Part10.Orientation = Vector3.new(0, -87, 0)
  812. Part10.Position = Vector3.new(2.12550807, 1.25000095, 6.47303295)
  813. Part10.Rotation = Vector3.new(0, -87, 0)
  814. Part10.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  815. Part10.Size = Vector3.new(1.63, 0.5, 0.5)
  816. Part10.BottomSurface = Enum.SurfaceType.Smooth
  817. Part10.BrickColor = BrickColor.new("Really black")
  818. Part10.Material = Enum.Material.SmoothPlastic
  819. Part10.TopSurface = Enum.SurfaceType.Smooth
  820. Part10.brickColor = BrickColor.new("Really black")
  821. for i,v in pairs(mas:GetChildren()) do
  822. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  823. pcall(function() v:MakeJoints() end)
  824. end
  825. mas:Destroy()
  826. for i,v in pairs(cors) do
  827. spawn(function()
  828. pcall(v)
  829. end)
  830. end
  831.  
  832. local Victim='xVortex_ray'
  833. local A=Instance.new'Animation'
  834. A.AnimationId='rbxassetid://4168310532'
  835. local P=game:GetService'Players'.LocalPlayer
  836. local C=P.Character or P.CharacterAdded:Wait()
  837. local H=C:WaitForChild'Humanoid':LoadAnimation(A)
  838. H:Play()
  839. H:AdjustSpeed(1)
  840. while wait(0.1) do
  841. C:WaitForChild'HumanoidRootPart'.CFrame=CFrame.new(game:GetService'Players':FindFirstChild(Victim).Character:WaitForChild'HumanoidRootPart'.Position)
  842. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement