Advertisement
ExecutorForALLdomain

Untitled

Jul 8th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.76 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. UnionOperation1 = Instance.new("UnionOperation")
  21. Script2 = Instance.new("Script")
  22. PointLight3 = Instance.new("PointLight")
  23. Configuration4 = Instance.new("Configuration")
  24. IntValue5 = Instance.new("IntValue")
  25. Tool6 = Instance.new("Tool")
  26. Part7 = Instance.new("Part")
  27. SpecialMesh8 = Instance.new("SpecialMesh")
  28. Sound9 = Instance.new("Sound")
  29. Sound10 = Instance.new("Sound")
  30. Sound11 = Instance.new("Sound")
  31. Script12 = Instance.new("Script")
  32. LocalScript13 = Instance.new("LocalScript")
  33. Camera14 = Instance.new("Camera")
  34. Script15 = Instance.new("Script")
  35. Model0.Name = "Sword Giver"
  36. Model0.Parent = mas
  37. UnionOperation1.Name = "EquipmentSpawner"
  38. UnionOperation1.Parent = Model0
  39. UnionOperation1.CFrame = CFrame.new(-21.7876625, 0.500000894, -10.1090317, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  40. UnionOperation1.Position = Vector3.new(-21.787662506103516, 0.5000008940696716, -10.109031677246094)
  41. UnionOperation1.Color = Color3.new(0.639216, 0.635294, 0.647059)
  42. UnionOperation1.Size = Vector3.new(4.000000476837158, 1.0000005960464478, 4)
  43. UnionOperation1.Anchored = true
  44. UnionOperation1.BrickColor = BrickColor.new("Medium stone grey")
  45. UnionOperation1.brickColor = BrickColor.new("Medium stone grey")
  46. Script2.Parent = UnionOperation1
  47. table.insert(cors,sandbox(Script2,function()
  48. -- See if I have a tool
  49. local spawner = script.Parent
  50. local tool = nil
  51. local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
  52. Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
  53. local parts = game.Workspace:FindPartsInRegion3(region)
  54. for _, part in pairs(parts) do
  55. if part and part.Parent and part.Parent:IsA("Tool") then
  56. tool = part.Parent
  57. break
  58. end
  59. end
  60.  
  61. local configTable = spawner.Configurations
  62. local configs = {}
  63. local function loadConfig(configName, defaultValue)
  64. if configTable:FindFirstChild(configName) then
  65. configs[configName] = configTable:FindFirstChild(configName).Value
  66. else
  67. configs[configName] = defaultValue
  68. end
  69. end
  70.  
  71. loadConfig("SpawnCooldown", 5)
  72.  
  73. if tool then
  74. tool.Parent = game.ServerStorage
  75.  
  76. while true do
  77. -- put tool on pad
  78. local toolCopy = tool:Clone()
  79. local handle = toolCopy:FindFirstChild("Handle")
  80. toolCopy.Parent = game.Workspace
  81. local toolOnPad = true
  82. local parentConnection
  83. parentConnection = toolCopy.AncestryChanged:connect(function()
  84. if handle then handle.Anchored = false end
  85. toolOnPad = false
  86. parentConnection:disconnect()
  87. end)
  88. if handle then
  89. handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
  90. handle.Anchored = true
  91. end
  92. -- wait for tool to be removed
  93. while toolOnPad do
  94. if handle then
  95. handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
  96. end
  97. wait()
  98. end
  99.  
  100. -- wait for cooldown
  101. wait(configs["SpawnCooldown"])
  102. end
  103.  
  104. end
  105.  
  106.  
  107.  
  108. --if tool then
  109. -- local handle = tool:FindFirstChild("Handle")
  110. -- local toolCopy = tool:Clone()
  111. -- toolCopy.Parent = game.ServerStorage
  112. -- local toolOnPad = true
  113. --
  114. -- local parentConnection
  115. -- parentConnection = tool.AncestryChanged:connect(function()
  116. -- if handle then handle.Anchored = false end
  117. -- toolOnPad = false
  118. -- parentConnection:disconnect()
  119. -- end)
  120. --
  121. -- if handle then
  122. -- handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
  123. -- handle.Anchored = true
  124. -- end
  125. --
  126. -- while true do
  127. -- while toolOnPad do
  128. -- if handle then
  129. -- handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
  130. -- end
  131. -- wait()
  132. -- end
  133. -- wait(configs["SpawnCooldown"])
  134. -- local newTool = toolCopy:Clone()
  135. -- newTool.Parent = game.Workspace
  136. -- handle = newTool:FindFirstChild("Handle")
  137. -- toolOnPad = true
  138. -- end
  139. --end
  140. end))
  141. PointLight3.Parent = UnionOperation1
  142. PointLight3.Color = Color3.new(0, 1, 0)
  143. PointLight3.Range = 10
  144. PointLight3.Shadows = true
  145. Configuration4.Name = "Configurations"
  146. Configuration4.Parent = UnionOperation1
  147. IntValue5.Name = "10"
  148. IntValue5.Parent = Configuration4
  149. IntValue5.Value = 5
  150. Tool6.Name = "ClassicSword"
  151. Tool6.Parent = Model0
  152. Tool6.TextureId = "rbxasset://Textures/Sword128.png"
  153. Tool6.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  154. Tool6.GripForward = Vector3.new(-1, -0, -0)
  155. Tool6.GripPos = Vector3.new(0, 0, -1.5)
  156. Tool6.GripRight = Vector3.new(0, 1, 0)
  157. Tool6.GripUp = Vector3.new(0, 0, 1)
  158. Part7.Name = "Handle"
  159. Part7.Parent = Tool6
  160. Part7.CFrame = CFrame.new(-21.6015606, 3.21144986, -9.64364624, -0.989256561, 0.143087044, 0.0299602766, 0.00654005678, -0.161418796, 0.986864388, 0.146043628, 0.976458013, 0.158748806)
  161. Part7.Orientation = Vector3.new(-80.7030029296875, 10.687999725341797, 177.67999267578125)
  162. Part7.Position = Vector3.new(-21.601560592651367, 3.2114498615264893, -9.643646240234375)
  163. Part7.Rotation = Vector3.new(-80.86199951171875, 1.7170000076293945, -171.77000427246094)
  164. Part7.Color = Color3.new(0.388235, 0.372549, 0.384314)
  165. Part7.Size = Vector3.new(1, 0.800000011920929, 4)
  166. Part7.BottomSurface = Enum.SurfaceType.Smooth
  167. Part7.BrickColor = BrickColor.new("Dark stone grey")
  168. Part7.Locked = true
  169. Part7.Reflectance = 0.4000000059604645
  170. Part7.TopSurface = Enum.SurfaceType.Smooth
  171. Part7.brickColor = BrickColor.new("Dark stone grey")
  172. Part7.FormFactor = Enum.FormFactor.Plate
  173. Part7.formFactor = Enum.FormFactor.Plate
  174. SpecialMesh8.Parent = Part7
  175. SpecialMesh8.MeshId = "rbxasset://fonts/sword.mesh"
  176. SpecialMesh8.TextureId = "rbxasset://textures/SwordTexture.png"
  177. SpecialMesh8.MeshType = Enum.MeshType.FileMesh
  178. Sound9.Name = "SwordSlash"
  179. Sound9.Parent = Part7
  180. Sound9.SoundId = "http://www.roblox.com/asset/?id=12222216"
  181. Sound9.Volume = 0.699999988079071
  182. Sound10.Name = "SwordLunge"
  183. Sound10.Parent = Part7
  184. Sound10.SoundId = "http://www.roblox.com/asset/?id=12222208"
  185. Sound10.Volume = 0.6000000238418579
  186. Sound11.Name = "Unsheath"
  187. Sound11.Parent = Part7
  188. Sound11.SoundId = "http://www.roblox.com/asset/?id=12222225"
  189. Sound11.Volume = 1
  190. Script12.Name = "SwordScript"
  191. Script12.Parent = Tool6
  192. table.insert(cors,sandbox(Script12,function()
  193. --Rescripted by Luckymaxer
  194. --EUROCOW WAS HERE BECAUSE I MADE THE PARTICLES AND THEREFORE THIS ENTIRE SWORD PRETTY AND LOOK PRETTY WORDS AND I'D LIKE TO DEDICATE THIS TO MY FRIENDS AND HI LUCKYMAXER PLS FIX SFOTH SWORDS TY LOVE Y'ALl
  195. --Updated for R15 avatars by StarWars
  196. --Re-updated by TakeoHonorable
  197.  
  198. Tool = script.Parent
  199. Handle = Tool:WaitForChild("Handle")
  200.  
  201. function Create(ty)
  202. return function(data)
  203. local obj = Instance.new(ty)
  204. for k, v in pairs(data) do
  205. if type(k) == 'number' then
  206. v.Parent = obj
  207. else
  208. obj[k] = v
  209. end
  210. end
  211. return obj
  212. end
  213. end
  214.  
  215. local BaseUrl = "rbxassetid://"
  216.  
  217. Players = game:GetService("Players")
  218. Debris = game:GetService("Debris")
  219. RunService = game:GetService("RunService")
  220.  
  221. DamageValues = {
  222. BaseDamage = 5,
  223. SlashDamage = 10,
  224. LungeDamage = 30
  225. }
  226.  
  227. --For R15 avatars
  228. Animations = {
  229. R15Slash = 522635514,
  230. R15Lunge = 522638767
  231. }
  232.  
  233. Damage = DamageValues.BaseDamage
  234.  
  235. Grips = {
  236. Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  237. Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
  238. }
  239.  
  240. Sounds = {
  241. Slash = Handle:WaitForChild("SwordSlash"),
  242. Lunge = Handle:WaitForChild("SwordLunge"),
  243. Unsheath = Handle:WaitForChild("Unsheath")
  244. }
  245.  
  246. ToolEquipped = false
  247.  
  248. --For Omega Rainbow Katana thumbnail to display a lot of particles.
  249. for i, v in pairs(Handle:GetChildren()) do
  250. if v:IsA("ParticleEmitter") then
  251. v.Rate = 20
  252. end
  253. end
  254.  
  255. Tool.Grip = Grips.Up
  256. Tool.Enabled = true
  257.  
  258. function IsTeamMate(Player1, Player2)
  259. return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  260. end
  261.  
  262. function TagHumanoid(humanoid, player)
  263. local Creator_Tag = Instance.new("ObjectValue")
  264. Creator_Tag.Name = "creator"
  265. Creator_Tag.Value = player
  266. Debris:AddItem(Creator_Tag, 2)
  267. Creator_Tag.Parent = humanoid
  268. end
  269.  
  270. function UntagHumanoid(humanoid)
  271. for i, v in pairs(humanoid:GetChildren()) do
  272. if v:IsA("ObjectValue") and v.Name == "creator" then
  273. v:Destroy()
  274. end
  275. end
  276. end
  277.  
  278. function Blow(Hit)
  279. if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
  280. return
  281. end
  282. local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
  283. if not RightArm then
  284. return
  285. end
  286. local RightGrip = RightArm:FindFirstChild("RightGrip")
  287. if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  288. return
  289. end
  290. local character = Hit.Parent
  291. if character == Character then
  292. return
  293. end
  294. local humanoid = character:FindFirstChildOfClass("Humanoid")
  295. if not humanoid or humanoid.Health == 0 then
  296. return
  297. end
  298. local player = Players:GetPlayerFromCharacter(character)
  299. if player and (player == Player or IsTeamMate(Player, player)) then
  300. return
  301. end
  302. UntagHumanoid(humanoid)
  303. TagHumanoid(humanoid, Player)
  304. humanoid:TakeDamage(Damage)
  305. end
  306.  
  307.  
  308. function Attack()
  309. Damage = DamageValues.SlashDamage
  310. Sounds.Slash:Play()
  311.  
  312. if Humanoid then
  313. if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  314. local Anim = Instance.new("StringValue")
  315. Anim.Name = "toolanim"
  316. Anim.Value = "Slash"
  317. Anim.Parent = Tool
  318. elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  319. local Anim = Tool:FindFirstChild("R15Slash")
  320. if Anim then
  321. local Track = Humanoid:LoadAnimation(Anim)
  322. Track:Play(0)
  323. end
  324. end
  325. end
  326. end
  327.  
  328. function Lunge()
  329. Damage = DamageValues.LungeDamage
  330.  
  331. Sounds.Lunge:Play()
  332.  
  333. if Humanoid then
  334. if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  335. local Anim = Instance.new("StringValue")
  336. Anim.Name = "toolanim"
  337. Anim.Value = "Lunge"
  338. Anim.Parent = Tool
  339. elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  340. local Anim = Tool:FindFirstChild("R15Lunge")
  341. if Anim then
  342. local Track = Humanoid:LoadAnimation(Anim)
  343. Track:Play(0)
  344. end
  345. end
  346. end
  347. --[[
  348. if CheckIfAlive() then
  349. local Force = Instance.new("BodyVelocity")
  350. Force.velocity = Vector3.new(0, 10, 0)
  351. Force.maxForce = Vector3.new(0, 4000, 0)
  352. Debris:AddItem(Force, 0.4)
  353. Force.Parent = Torso
  354. end
  355. ]]
  356.  
  357. wait(0.2)
  358. Tool.Grip = Grips.Out
  359. wait(0.6)
  360. Tool.Grip = Grips.Up
  361.  
  362. Damage = DamageValues.SlashDamage
  363. end
  364.  
  365. Tool.Enabled = true
  366. LastAttack = 0
  367.  
  368. function Activated()
  369. if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  370. return
  371. end
  372. Tool.Enabled = false
  373. local Tick = RunService.Stepped:wait()
  374. if (Tick - LastAttack < 0.2) then
  375. Lunge()
  376. else
  377. Attack()
  378. end
  379. LastAttack = Tick
  380. --wait(0.5)
  381. Damage = DamageValues.BaseDamage
  382. local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
  383. Name = "R15Slash",
  384. AnimationId = BaseUrl .. Animations.R15Slash,
  385. Parent = Tool
  386. })
  387.  
  388. local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
  389. Name = "R15Lunge",
  390. AnimationId = BaseUrl .. Animations.R15Lunge,
  391. Parent = Tool
  392. })
  393. Tool.Enabled = true
  394. end
  395.  
  396. function CheckIfAlive()
  397. return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false)
  398. end
  399.  
  400. function Equipped()
  401. Character = Tool.Parent
  402. Player = Players:GetPlayerFromCharacter(Character)
  403. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  404. Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
  405. if not CheckIfAlive() then
  406. return
  407. end
  408. ToolEquipped = true
  409. Sounds.Unsheath:Play()
  410. end
  411.  
  412. function Unequipped()
  413. Tool.Grip = Grips.Up
  414. ToolEquipped = false
  415. end
  416.  
  417. Tool.Activated:Connect(Activated)
  418. Tool.Equipped:Connect(Equipped)
  419. Tool.Unequipped:Connect(Unequipped)
  420.  
  421. Connection = Handle.Touched:Connect(Blow)
  422. end))
  423. LocalScript13.Name = "MouseIcon"
  424. LocalScript13.Parent = Tool6
  425. table.insert(cors,sandbox(LocalScript13,function()
  426. --Made by Luckymaxer
  427.  
  428. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  429. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  430.  
  431. Tool = script.Parent
  432.  
  433. Mouse = nil
  434.  
  435. function UpdateIcon()
  436. if Mouse then
  437. Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  438. end
  439. end
  440.  
  441. function OnEquipped(ToolMouse)
  442. Mouse = ToolMouse
  443. UpdateIcon()
  444. end
  445.  
  446. function OnChanged(Property)
  447. if Property == "Enabled" then
  448. UpdateIcon()
  449. end
  450. end
  451.  
  452. Tool.Equipped:Connect(OnEquipped)
  453. Tool.Changed:Connect(OnChanged)
  454.  
  455. end))
  456. Camera14.Name = "ThumbnailCamera"
  457. Camera14.Parent = Tool6
  458. Camera14.CFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
  459. Camera14.CoordinateFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
  460. Camera14.Focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  461. Camera14.focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  462. Script15.Name = "Read me"
  463. Script15.Parent = Model0
  464. table.insert(cors,sandbox(Script15,function()
  465. -- This Sword Giver Made By Entity10185 --
  466. -- This Sword Giver Can be Copy --
  467. -- Follow My Profile for Anothers Kit --
  468.  
  469. end))
  470. for i,v in pairs(mas:GetChildren()) do
  471. v.Parent = workspace
  472. pcall(function() v:MakeJoints() end)
  473. end
  474. mas:Destroy()
  475. for i,v in pairs(cors) do
  476. spawn(function()
  477. pcall(v)
  478. end)
  479. end
  480.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement